heehaw Odets
Registered User
Join date: 13 Jul 2005
Posts: 11
|
07-27-2005 05:22
i been tweaking at a single line of code for days.... >_> well okay fine maybe about five or six hours but i dont know how to maek it work. its just: llSetLocalRot(<0,0,1>,0,0);
and youve guessed it, its a rotation!!!!, but um... im trying to make a child prim rotate without rotating the main piece or any other child prims. so it should be like a buncha prims linked together with one or 2 rotating but theyll be different speeds or directions.... if anyone knows how to make this work, id appreciate help O.o
|
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
|
07-27-2005 05:36
Are you trying to set the rotation (as in, angle relative to X, Y and Z axes) or to make a child prim rotate continuously ?
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
|
Champie Jack
Registered User
Join date: 6 Dec 2003
Posts: 1,156
|
07-27-2005 06:40
You need to specify your rotation as a quaternion to learn more about that, check out LSL WIKI: Rotation
|
heehaw Odets
Registered User
Join date: 13 Jul 2005
Posts: 11
|
07-27-2005 12:09
i wanan maek the child prim roatet continueously in a direction specified by the x,y,z stuff....
|
Champie Jack
Registered User
Join date: 6 Dec 2003
Posts: 1,156
|
07-27-2005 13:35
From: heehaw Odets i wanan maek the child prim roatet continueously in a direction specified by the x,y,z stuff.... it needs to be a quaternion. Read the link default { state_entry() { llSetText("Touch Me! I'm a rotating Child Prim\nI Rotate 45 degress around the Z-Axis\nRelative to the Rotation of my Parent", <1,1,1>, 1.0); }
touch_start(integer total_number) { vector eul = <0,0,90>; //45 degrees around the z-axis, in Euler form eul *= DEG_TO_RAD; //convert to radians rotation quat = llEuler2Rot(eul); //convert to quaternion //llSetRot(quat); //rotate the object llSetLocalRot(quat*llGetLocalRot()); } }
|
heehaw Odets
Registered User
Join date: 13 Jul 2005
Posts: 11
|
07-27-2005 14:33
thanks champie, i tried that script its working great and thanks for the example... ~BUT~ its only works on click and i tried to just remove the click start thigny and then i should work normally without click correct? didnt work wihtout it T_T... so i still do need a script that rotates the child prim constantly...unless if someone can maek champie's script work auto.
|
Rayve Mendicant
Scripts for L$5 billion
Join date: 12 Mar 2005
Posts: 90
|
07-27-2005 14:36
llSetTargetOmega() will rotate constantly see here: /54/4e/54721/1.html for examples of rotating different direction/speeds
_____________________
_______________________ Rayve Mendicant Second Evolution "Darwin ain't got nothin' on this"
|