Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Off axis rotation

tucor Capalini
Registered User
Join date: 18 Jun 2007
Posts: 44
01-26-2008 23:12
OK, I have to assume this is able to be done, and I have a hunch that it is easy, but for the life of me, I cannot figure it out.
I have a tourus (Revolution 3.00) with rotational orientation of 0,33,0
what I would like to do is rotate it around its X axis (local) so that it turns like an Archimedes Screw.
Actually, i have 4 in a row lined up and I would like them all to turn together. I am assuming that this would be no problem.
thanks!
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
01-27-2008 00:49
If you want them all to turn synchronously, that can be a problem unless they are all linked as a single object and you turn that (which'll only require turning the root prim). Otherwise, you'll have to either live with the discrepency of llTargetOmega(), or try to synchronize very carefully the use of llRotLookAt() or llSetRot() in all the prims.

As for the axis of rotation, it depends on how you are going to rotate the prim/object. If you need a global axis about which to rotate (applies to llTargetOmega()), then try 'llRot2Fwd(llGetRot())' (takes the prim's current rotation and determines its local x-axis direction from that). If the object rotates, this will have to be recalculated. There are a number of recent threads about this, so you should be able to find them if you look around a little bit for other rotation questions.

If you're going to set rotations instead (llRotLookAt(), llSetRot(), etc.), then you'll need to construct a rotation that is a combination of the desired rotational increment and the prim's current rotation. Something like (note that the order is very important, so don't reverse it!): llEuler2Rot(<angleInRads, 0.0, 0.0>;)*llGetRot()

Hope that helps. Make sure to post follow-ups if any of this isn't clear.
tucor Capalini
Registered User
Join date: 18 Jun 2007
Posts: 44
01-27-2008 12:38
It's a bit over my head at the moment.
But its sunday, I have a full tank of gas, its night time, and im wearing shades......
and theres a wikki :)
Thanks for the tip!