|Anonymous | Login | Signup for a new account||2020-01-26 00:02 PST|
|Main | My View | View Issues | Change Log | Roadmap | Summary | My Account|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002842||opensim||[REGION] Physics Engines||public||2008-12-15 11:37||2012-09-17 22:06|
|Target Version||Fixed in Version|
|Summary||0002842: The Recent Activation of llSetTorque Will Not Toggle|
|Description||Here is some code for a simple cube object. If you rez it and click it, it should turn torque on and off.|
float grav = 9.8;
integer toggle = 1;
mass = llGetMass();
if (toggle < 0) llSetTorque(mass * <0,0,0>, FALSE);
if (toggle > 0) llSetTorque(mass * <50, 0, 0>, FALSE);
toggle *= -1;
The cube spins on first click, then stops spinning on second click. Then it will not restart with additional clicks.
Unless, you play around and edit it, or set it non physical. The "re-energizing" of rotation seems to be related to the cube being set briefly non physical (or non-existant).
|Additional Information||Behaves thus in Hiro's sim. No idea of his sim version config so what I specify below could be bogus.|
Significant issue . . . setting llSetTorque to 0 . . . it's not clear that should stop rotation or merely stop continued acceleration of rotation rate.
|Tags||No tags attached.|
|Git Revision or version number|
|Run Mode||Grid (1 Region per Sim)|
|Environment||Mono / Windows|
|This may be a broader problem with the touch event. I have a cigar I've been smoking for 6 or 8 months that is touch-activated - I can no longer get it to work as of r7708|
|Owen's LSL code was also tested on my region running on 32 bit debian unstable with mono r2.3a, yielding similar results|
The toggle appears to work now. But there is a new observation.
A cube rezzed on the ground and with the script pasted above within it will begin to rise vertically upward from the torque of the cube corner pushing against the ground (one supposes). A click of the cube stops this vertical motion and there is nothing in the script to cause this.
The click also does nothing to the cube rotation, and probably properly. Another click increases the rotation rate, also probably properly.
The rotation/torque-relevant LSL script instructions activated are llApplyRotationalImpulse and llSetTorque. It would be VERY GOOD if llTargetOmega were included with these two torque-relevant LSL instructions activated. Boat heading change simplifies with llTargetOmega.
Additional observation. This is bad.
The stop vertical motion noted above is clearly a flaw in implementation. llSetRot sets velocity to zero (the object becomes non physical briefly) in order to rotate. I have placed llSetTorque in a boat and executed it and I find it now behaves just like llSetRot -- meaning the velocity is going to zero for each turn, which is not as it should be. llSetTorque is supposed to operate on purely physical objects, without ever setting them non physical.
Tested this with a local region server
1st click: Prim turns
2nd click: Prim stops
3rd click: Prim turns again
|At least, tested on 0.7.2-dev, the phenomenon described in (0008561) still exists.|
|confirmed in september 2012|
|2008-12-15 11:37||OwenOyen||New Issue|
|2008-12-15 11:37||OwenOyen||SVN Revision||=> 0|
|2008-12-15 11:37||OwenOyen||Run Mode||=> Grid (1 Region per Sim)|
|2008-12-15 11:37||OwenOyen||Physics Engine||=> ODE|
|2008-12-15 11:37||OwenOyen||Environment||=> Mono / Windows|
|2008-12-15 11:37||OwenOyen||Mono Version||=> 2.0.1|
|2008-12-16 07:02||Twitch||Note Added: 0007988|
|2008-12-16 07:03||Twitch||Note Added: 0007989|
|2008-12-30 09:11||OwenOyen||Note Added: 0008561|
|2008-12-30 09:18||OwenOyen||Note Added: 0008562|
|2009-09-18 09:18||Fly-Man-||Note Added: 0013482|
|2009-09-18 09:18||Fly-Man-||Status||new => feedback|
|2011-08-06 20:26||makopoppo||Note Added: 0019405|
|2011-08-06 20:26||makopoppo||Status||feedback => acknowledged|
|2012-09-17 22:06||thomax||Note Added: 0022624|
|Copyright © 2000 - 2012 MantisBT Group|