Im very new to this game. I am experienced at modelling its just the scripting. Can someone tell me how to make my canopy rotate 90° when i click it.
Thanks, Dave
These forums are CLOSED. Please visit the new forums HERE
Simple Canopy Rotation |
|
Davy Flytrap
Registered User
Join date: 21 Feb 2005
Posts: 146
|
02-21-2005 08:49
Im very new to this game. I am experienced at modelling its just the scripting. Can someone tell me how to make my canopy rotate 90° when i click it.
Thanks, Dave |
Huns Valen
Don't PM me here.
![]() Join date: 3 May 2003
Posts: 2,749
|
02-21-2005 09:49
http://secondlife.com/badgeo/wakka.php?wakka=llSetLocalRot
http://secondlife.com/badgeo/wakka.php?wakka=llSetPos I like to use llEuler2Rot and llRot2Euler with rotations. It allows you to specify rotation around the x, y, and z axes without having to know anything about quaternions. Use multiples of pi, e.g. PI_BY_TWO, PI, TWO_PI. Example: llSetLocalRot(llEuler2Rot(<PI_BY_TWO, 0, 0> ![]() That trick also makes it a lot easier to do the rotations in llSitTarget if your seat prim is not at zero rotation. Before you start messing around with llSetLocalRot, do this: llSay(0, "Base rotation: "+(string)llRot2Euler(llGetRot())); Use what it says for your base (closed canopy) rotation. Then you can play with the three axes using euler vectors. Easy! _____________________
|
Spider Mandala
Photshop Ninja
![]() Join date: 29 Aug 2003
Posts: 194
|
02-21-2005 10:29
Just thought Id chime in with a second option. If you're not worried about the actual movement of the prim, just want it to go up/down. You could also use llSetAlpha on a sort of toggle to switch back and forth between an "up" canopy and a "down" canopy, by making one transparent while the other is opaque and vice versa. Old trick, still works.
_____________________
"There's an old saying in Tennessee, I know it's in Texas, probably in Tennessee, that says, fool me once... shame on... shame on you. You fool me, you can't get fooled again."
-George W. Bush East Literature Magnet School, Nashville, Tennessee, Sep. 17, 2002 |
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
|
02-22-2005 01:54
On a related note: Is there a simple way to rotate a root prim about its local axis versus its world axis? If not, that function goes to the top of my feature request list... I hate dealing with the LSL rotation functions!
In other words, is there a non-physical function equal to llApplyRotationalImpulse()? Sweet! I just figured it out! llSetRot(llAxisAngle2Rot(llRot2Left(llGetRot()), PI/12)); |