|
Goapinoa Primeau
Addict
Join date: 29 Jun 2006
Posts: 58
|
08-04-2006 19:10
A few suggests would be much appreciated as too how i can realistically animate my r2d2.
I found a copy of the basic model and rebuilt it to reset the rotations etc so he points in line with his x axis forward. Now im trying to get him to do the little tilt back in the opposite direction to his forward motion(crucial for realism). Whatever i try i dont seem to be able to get him to tilt backwards regardless of the global reference. he seems always to be stuck using this frame of reference. and so ends up in the worng position. Also even when he tilts in the correct direction (which is currently only when he facing a certain way in the beginnning) I haven't been able to restore the original rotation to stand him upright again at the end of his movment.
If someone could talk me throught the steps i need to accomplish this without actually coding it for me that wuold be a huge help
its stumped me for days!!
so far i think these are the steps i need to build code for,
get root rot convert it to euler add offset for tilt convert back to quat apply
am i missing something, my brains fried trying to get this too work
|
|
Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
|
08-04-2006 20:00
How are you adding the offset?
Remember that the rotation value you're adjusting is the rotation in the world's coordinate system, so you will need to modify the offset you're adding into the world's coordinate system too (multiply the quaternion by llGetRot() ).
|
|
Joannah Cramer
Registered User
Join date: 12 Apr 2006
Posts: 1,539
|
08-04-2006 20:36
From: Goapinoa Primeau get root rot convert it to euler add offset for tilt convert back to quat apply That's overcomplicating it, and you *really* want to avoid Euler conversions if possible ^^ rotation spin = llAxisAngle2Rot( <0,1,0>, PI * -0.25 ); llSetRot( spin * llGetRot() );
to swing 45 degree towards rear, no matter local rotation. To bring it back to vertical position, just use opposite angle, PI * 0.25 .. or whatever amount you are actually rotating it by.
|
|
Goapinoa Primeau
Addict
Join date: 29 Jun 2006
Posts: 58
|
beep beep bitti beep beep, (head spin, explode, smoke effects + TILT!
08-05-2006 00:56
Thanks both, huge appreciate from me and R2!!!
so simple when you know how, and thanks to you now i do!
|