Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006378opensim[REGION] Script Functionspublic2012-10-25 03:162016-11-26 07:16
Assigned To 
Statuspatch includedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
DescriptionAlthough we have an primitive params constant for angular velocity, there are no corresponding property for linear velocity or acceleration.

There's also no means for preventing LSL funcs from using OSSL parameters.
Additional Informationdefault{
    touch_start(integer t){
        llOwnerSay(llList2CSV(osGetLinkPrimitiveParams(LINK_SET, [OS_PRIM_VELOCITY])));

TagsNo tags attached.
Git Revision or version number
Run ModeStandalone (1 Region)
Physics EngineBasicPhysics
Script Engine
Environment.NET / Windows32
Mono VersionNone
Attached Filespatch file icon OS_PRIM_VELOCITY.patch [^] (14,961 bytes) 2012-10-25 03:16 [Show Content]
patch file icon OS_PRIM_VELOCITY-and-OS_PRIM_ACCELERATION.patch [^] (18,256 bytes) 2012-10-26 06:06 [Show Content]
patch file icon OS_PRIM_VELOCITY-OS_PRIM_ACCELERATION-OS_PRIM_PROJECTION.patch [^] (37,424 bytes) 2012-10-31 07:48 [Show Content]

- Relationships

-  Notes
SignpostMarv (reporter)
2012-10-25 03:16

This patch also includes some formatting/documentation tweaks to LSL constants.
SignpostMarv (reporter)
2012-10-25 03:17

the constant is PRIM_OMEGA, not OS_PRIM_OMEGA ¬_¬
justincc (administrator)
2012-10-25 17:40

I'm assuming llApplyImpulse() or llSetForce() are not enough as this is the function to apply values to individual links. However, both llApplyImpulse() and llSetForce() appear to act through the parent group/root part only. What is the effect of applying velocities to individual parts? Is this supported by the physics engines? Does SL (as I suspect) only support applying velocities to objects as a whole?

If this were to exist, I think it should also be only on osSetLinkPrimitiveParamsFast() if it's not part of the LSL system. What do you think?
SignpostMarv (reporter)
2012-10-26 03:15
edited on: 2012-10-26 03:17

osSetPrimitiveParams wraps to ILSL_Api.SetPrimitiveParamsEx which wraps to the same SetPrimParams method used by llSetLinkPrimitiveParamsFast.

I'll get a video of the effect of this function later.

SignpostMarv (reporter)
2012-10-26 03:58

Prim velocities can be used for non-physical movement. One could have something appear to move on a conveyor belt without actually moving it on the server-side.

A really sneaky trick would be to have several objects obscured by a dispenser disappear into another apparatus, rather than using llRezObject() & llDie(), one could just use OS_PRIM_VELOCITY to make it appear as if an object is repeatedly being dispensed & collected when it's actually just having the velocity set on the root prim, then quickly set to zero & reset on a timer.
SignpostMarv (reporter)
2012-10-26 04:00
edited on: 2012-10-26 05:37

Demonstration of how OS_PRIM_VELOCITY could be used for artistic/gaming purposes: [^] , and a slightly more practical demo showing balloon release: [^]

SignpostMarv (reporter)
2012-10-26 06:06
edited on: 2012-10-26 06:09

Added a patch for OS_PRIM_ACCELERATION

Video demo: [^]

SignpostMarv (reporter)
2012-10-26 08:19

One gets interesting effects with physical objects, although I'm unsure if it's expected behaviour:

        llSetStatus(STATUS_PHYSICS, TRUE);
    touch_start(integer t)
                <llFrand(2) - 1,llFrand(2) - 1,10>
    land_collision(vector p){
        state stop;

        state stop;

state stop{
        llSetStatus(STATUS_PHYSICS, FALSE);

    touch_start(integer t){
        state default;
Robert Adams (administrator)
2012-10-26 10:00

Looking at the code, setting of velocity, acceleration and angularVelocity is not fully implemented. ODE computes these values and fetching them returns the correct value. Setting and fetching on a non-physical object is a non-operation. Setting force and torque is fully implemented and probably the way everyone has changed velocity, et al in the past.

I assume the effect shown in the videos is the viewer applying received velocity while the physical representation of the static object does not move in the simulator or physics engine.
SignpostMarv (reporter)
2012-10-29 02:45

That assumption is correct, objects don't move (hence why they snap back).
SignpostMarv (reporter)
2012-10-31 07:52

Latest patch includes work done for OS_PRIM_PROJECTION that gives LSL functions (llSetPrimitiveParams etc.) a config option for allowing the use of OSSL constants, e.g. OS_PRIM_VELOCITY, OS_PRIM_ACCELERATION, OS_PRIM_PROJECTION.

SetPrimParams was made a public method (as GetPrimParams was made somewhere down the line) in order to facilitate an effective clone of llSetLinkPrimitiveParamsFast in osSetLinkPrimitiveParams (with the OSSL clone always allowing the use of OSSL constants).
SignpostMarv (reporter)
2012-10-31 07:53

updated the example LSL script to reflect the default configuration.
SignpostMarv (reporter)
2013-06-27 06:09

Just checked if this patch will apply; the patch won't apply and I'm guessing it's not worth redoing unless these are actually going to be useful.
djphil (reporter)
2016-11-26 00:19

Think now that it is possible to implement OS_PRIM_VELOCITY and OS_PRIM_ACCELERATION.
These 2 parameters offer very interesting possibilities.
It would be nice to implement these two patches proposed by SignpostMarv
djphil (reporter)
2016-11-26 00:56

Of course implement OS_PRIM_PROJECTION is nice too :)
(It is recognized by highlight syntax in FireStorm but not implemented in Opensim).
UbitUmarov (administrator)
2016-11-26 07:16

Sorry NO
VELOCITY and ACCELERATION setting Is a root prim only thing.
read could be by prim, to account for link set rotation effects, but not sure all engines do it.

OS_PRIM_PROJECTION does seem possible.. I will look into it one of this days

- Issue History
Date Modified Username Field Change
2012-10-25 03:16 SignpostMarv New Issue
2012-10-25 03:16 SignpostMarv File Added: OS_PRIM_VELOCITY.patch
2012-10-25 03:16 SignpostMarv Note Added: 0022917
2012-10-25 03:16 SignpostMarv Status new => patch included
2012-10-25 03:17 SignpostMarv Note Added: 0022918
2012-10-25 03:17 SignpostMarv Summary OS_PRIM_VELOCITY, an accompaniment to OS_PRIM_OMEGA => OS_PRIM_VELOCITY, an accompaniment to PRIM_OMEGA
2012-10-25 17:40 justincc Note Added: 0022930
2012-10-25 17:40 justincc Status patch included => patch feedback
2012-10-26 03:15 SignpostMarv Note Added: 0022941
2012-10-26 03:17 SignpostMarv Note Edited: 0022941 View Revisions
2012-10-26 03:58 SignpostMarv Note Added: 0022942
2012-10-26 04:00 SignpostMarv Note Added: 0022943
2012-10-26 05:37 SignpostMarv Note Edited: 0022943 View Revisions
2012-10-26 06:06 SignpostMarv File Added: OS_PRIM_VELOCITY-and-OS_PRIM_ACCELERATION.patch
2012-10-26 06:06 SignpostMarv Note Added: 0022944
2012-10-26 06:06 SignpostMarv Status patch feedback => patch included
2012-10-26 06:08 SignpostMarv Summary OS_PRIM_VELOCITY, an accompaniment to PRIM_OMEGA => OS_PRIM_VELOCITY & OS_PRIM_ACCELERATION, an accompaniment to PRIM_OMEGA
2012-10-26 06:08 SignpostMarv Description Updated View Revisions
2012-10-26 06:09 SignpostMarv Note Edited: 0022944 View Revisions
2012-10-26 08:19 SignpostMarv Note Added: 0022945
2012-10-26 10:00 Robert Adams Note Added: 0022946
2012-10-29 02:45 SignpostMarv Note Added: 0022949
2012-10-31 07:48 SignpostMarv File Added: OS_PRIM_VELOCITY-OS_PRIM_ACCELERATION-OS_PRIM_PROJECTION.patch
2012-10-31 07:52 SignpostMarv Note Added: 0022980
2012-10-31 07:52 SignpostMarv Summary OS_PRIM_VELOCITY & OS_PRIM_ACCELERATION, an accompaniment to PRIM_OMEGA => OS_PRIM_VELOCITY & OS_PRIM_ACCELERATION, an accompaniment to PRIM_OMEGA + OS_PRIM_PROJECTION
2012-10-31 07:52 SignpostMarv Description Updated View Revisions
2012-10-31 07:53 SignpostMarv Note Added: 0022981
2012-10-31 07:53 SignpostMarv Additional Information Updated View Revisions
2013-06-27 06:09 SignpostMarv Note Added: 0024148
2016-11-26 00:19 djphil Note Added: 0031328
2016-11-26 00:56 djphil Note Added: 0031330
2016-11-26 07:16 UbitUmarov Note Added: 0031331

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker