|
Cypher Ragu
[Mad Scientist]
Join date: 6 Jul 2008
Posts: 174
|
04-22-2009 16:38
Hello everyone. I have a couple of questions on rotating physical objects via LSL...
1) What is the speed of the rotation measured in? Degrees per second?
2) Let's say I have an object already rotating along the Z axis at five degrees per second. If I call a physical rotation function such as llSetTorque to rotate the object at two degrees per second, will those extra two degrees per second be added on to the original 5 to get a total of 7 degrees per second, or will the rotation slow down to 2 degrees per second?
Thanks in advance. ^_^
_____________________
Life is a highway... And I just missed my exit.
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
04-22-2009 17:40
radians per second I can't find the graphic in either of the current wiki pages. It is here in the mirror though, plus all of the other info on radians: http://www.cheesefactory.us/lslwm/radian.htm
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Cypher Ragu
[Mad Scientist]
Join date: 6 Jul 2008
Posts: 174
|
04-22-2009 17:43
That explains a lot. <_<;
I'll try experimenting to find the answer to my second question.
_____________________
Life is a highway... And I just missed my exit.
|
|
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
|
04-22-2009 17:47
The value applied is a force, not degrees per second, the amount of force needed is based on the mass of the object * the gravity (9.8 meters per second).
float mass = llGetMass(); // mass of this object float gravity = 9.8; // gravity constant llSetForce(mass * <0,0,gravity>, FALSE); // in global orientation
... will levitate an object (like llSetBuoyancy (1.0) will). Note how the force set changes as the mass of the object changes. So, the value you want to use is going to be based on the mass of the object (including the avatar if it's attached). If attached, llGetMass() will return the mass of the object plus the avatar (and any other attachments). There is no additive thing here, you're simply setting a constant force being applied to the object.
_____________________
My tutes http://www.youtube.com/johanlaurasia
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
04-22-2009 17:55
From: Johan Laurasia The value applied is a force, not degrees per second, the amount of force needed is based on the mass of the object * the gravity (9.8 meters per second).
llTargetOmega takes a direct input of radians per second. If you are using llApplyRotationalImpulse, llSetTorque, or llSetForceAndTorque, then you can use llGetOmega to see what the radians per second are and adjust accordingly.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|