|
Tuber Potato
Registered User
Join date: 26 Jan 2006
Posts: 57
|
03-24-2008 20:24
Hi all,
I have combed the threads here and can't find a simple answer.
If I use llTargetOmega(<0,0,.5>,PI,1.0);
my object rotates on the Sims axis. So if I use this, the objext spins on the Z axis of the sim, but if I edit the object, and rotate it 90 degrees, it is still rotating on the Z axis of the sim...
How do I make an object rotate relative to itself? Meaning, if I set it rotating, then edit it and rotate it 90 degrees manually, the spin also changes by 90 degrees?
TIA Tuber
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
03-24-2008 21:31
llTargetOmega( <0,0,.5> * llGetRot(), PI, 1.0 );//-- IIRC
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Crunch Underwood
Mr. Grown up, Go away sir
Join date: 25 Sep 2007
Posts: 624
|
03-24-2008 21:34
if you link it to a non rotating parent prim and add the rotation the the child prim it will move with the parent prim...problems arise when you want to rotate several prims tho, each one needs a rotation script and if there offset and not from a central point you might need to use some maths.....or hit and miss in my case.
or so is my understanding, i'v not played with that for a while. Hopefully someone will be able to give you an easier answer to that problem, i'd love to know myself.
-Crunch
_____________________
---------------------------------------------- So your final Nimbus Score is 8.15, a quite remarkable achievement for a biped. Congratulations Crunch, you should be very proud. 
|
|
Tuber Potato
Registered User
Join date: 26 Jan 2006
Posts: 57
|
03-25-2008 08:22
Thank you both. I did not know that linking it to a parent prim would give it a new set of axis. This works probably for things like wheels on cars.
I was hoping to build a propeller, like on a helicopter or airplane. But I can understand what you mean about rotating more than one prim... If I built the propeller with a parent prim as the drive shaft, then added prims to the top for 'blades' on the propeller, they would rotate all funky. To use this rotation system, I would have to have a single prim as the propeller blades utilizing a texture that looks like propeller blades.
Anyway, thanks for the insight.
|