Jump to content

rotation problem i am a noob before you say it


Urzul
 Share

You are about to reply to a thread that has been inactive for 4429 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

No. You have mathematical two problems, rolled into one.  First, angular measurements are all in radians, although you can convert degree to radians if that's a system you are more comfortable with. Second, rotations in SL and many other environments are handled as quaternions, in which the x,y, and z are angular measurements with an imaginary component.  You can read more about rotations in general here >>> http://wiki.secondlife.com/wiki/Rotation and about quaternions in particular here >>> http://wiki.secondlife.com/wiki/Quaternion .  Unless you are mathematically inclined, much of that will make your head hurt.  It's easier to learn and use some simple rules instead.  For example, if you want to rotate your object 30 degrees around the global Y axis, use

llSetLinkPrimitiveParams( LINK_THIS,[ PRIM_ROTATION,llEuler2Rot(<0.0,30.0,0.0>*DEG_TO_RAD) ] );

in which the conversion from degrees to radians is taken care of by the constant DEG_TO_RAD and the conversion from an Euler rotation in X, Y, Z is converted to a quaternion by the llEuler2Rot function.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4429 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...