Anonymous | Login | Signup for a new account | 2019-12-07 16:39 PST | ![]() |
Main | My View | View Issues | Change Log | Roadmap | Summary | My Account |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0007524 | opensim | [REGION] Script Functions | public | 2015-04-06 18:29 | 2015-08-18 09:34 | ||||
Reporter | cinderblocks | ||||||||
Assigned To | nebadon | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | Linux | OS | Slackware | OS Version | 14.1 | ||||
Product Version | master (dev code) | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0007524: llTargetOmega ignores gain arguement | ||||||||
Description | llTargetOmega in xengine ignores the gain argument. As per http://wiki.secondlife.com/wiki/LlTargetOmega [^] , the gain argument shall modulates the final spinrate and disables the rotation behavior if zero. This is simple to fix, really, just multiply spinrate by gain. | ||||||||
Steps To Reproduce | llTargetOmega(<1.0,0.0,0.0>*llGetRot(), 0.1, 0.01); vs llTargetOmega(<1.0,0.0,0.0>*llGetRot(), 0.1, 1.0); vs llTargetOmega(<1.0,0.0,0.0>*llGetRot(), 0.1, 0.0); <- this one should actually stop the rotation completely per spec. | ||||||||
Tags | No tags attached. | ||||||||
Git Revision or version number | |||||||||
Run Mode | Grid (1 Region per Sim) | ||||||||
Physics Engine | BulletSim | ||||||||
Script Engine | |||||||||
Environment | Mono / Linux64 | ||||||||
Mono Version | trunk | ||||||||
Viewer | N/A | ||||||||
Attached Files | ![]() ![]() | ||||||||
![]() |
|||||||||||
|
![]() |
|
(0027986) Magnuz (reporter) 2015-04-07 11:07 edited on: 2015-04-07 23:16 |
I'm sorry, but this interpretation of gain in llTargetOmega is not correct. The description in http://wiki.secondlife.com/wiki/LlTargetOmega [^] is over-simplified and incomplete. The description in http://lslwiki.net/lslwiki/wakka.php?wakka=lltargetomega [^] is somewhat better. llTargetOmega( vector axis, float spinrate, float gain ) is really two different functions, even if they produce visually similar results. Function 1, non-physical llTargetOmega, in SL: 'axis' = the axis around which the object rotates. 'spinrate' * length('axis') = the spin rate in radians per second the object rotates with if gain is non-zero. 'gain' = rotation on if non-zero, off if zero. Stated to be entirely client-side once set from the server, but there are indications it is now continuously synchronized from the server in SL. 'gain' is not implemented in OpenSim, but should be used like this for non-physical objects: protected void TargetOmega(SceneObjectPart part, LSL_Vector axis, double spinrate, double gain) { PhysicsActor pa = part.PhysActor; if ( ( pa == null || !pa.IsPhysical ) && gain == 0.0d ) spinrate = 0.0d; part.UpdateAngularVelocity(axis * spinrate); } Function 2, physical llTargetOmega, in SL: 'axis' = the axis around which the object rotates. 'spinrate' * length('axis') = the spin rate in radians per second the object tries to reach, affected by other physics interaction like powers and friction. 'gain' = the strength with which the object tries to reach or maintain the set spin rate. With a smaller 'gain', the acceleration is slower, and if it doesn't exceed counter-acting physics interactions, like friction, actual spin rate will never reach set spin rate and may actually stay at zero. 'gain' is not implemented in OpenSim, and requires a rather complex physics model to work like in SL. Perhaps something for Robert Adams. I added the patch ( 0001-Fix-llTargetOmega-non-physical-gain.patch ) for the non-physical version. |
(0027995) nebadon (administrator) 2015-04-12 12:17 |
patch applied > http://opensimulator.org/viewgit/?a=commit&p=opensim&h=bdb91d0e70e74827cde0970d4ad224d971f3ca02 [^] |
(0029239) aiaustin (developer) 2015-08-18 09:34 |
Resolved issue marked as closed. Please open a new issue and refer to this one if problems arise. |
![]() |
|||
Date Modified | Username | Field | Change |
2015-04-06 18:29 | cinderblocks | New Issue | |
2015-04-06 18:29 | cinderblocks | File Added: patch.diff | |
2015-04-06 18:30 | cinderblocks | Status | new => patch included |
2015-04-07 11:07 | Magnuz | Note Added: 0027986 | |
2015-04-07 23:16 | Magnuz | Note Edited: 0027986 | View Revisions |
2015-04-07 23:17 | Magnuz | File Added: 0001-Fix-llTargetOmega-non-physical-gain.patch | |
2015-04-12 12:17 | nebadon | Note Added: 0027995 | |
2015-04-12 12:18 | nebadon | Status | patch included => resolved |
2015-04-12 12:18 | nebadon | Resolution | open => fixed |
2015-04-12 12:18 | nebadon | Assigned To | => nebadon |
2015-04-13 10:54 | Magnuz | Relationship added | related to 0006543 |
2015-04-13 10:54 | Magnuz | Relationship added | related to 0007304 |
2015-08-18 09:34 | aiaustin | Note Added: 0029239 | |
2015-08-18 09:34 | aiaustin | Status | resolved => closed |
Copyright © 2000 - 2012 MantisBT Group |