Joshua Nightshade
Registered dragon
Join date: 12 Oct 2004
Posts: 1,337
|
11-25-2004 02:21
okay, I'm trying to script a vehicle, fully aware that I can't script, and I'm having massive amounts of trouble getting me- the person sitting in the vehicle- oriented in the correct direction when sitting down. I finally got the XYZ positioning to work, so I'm placed in the right spot, but I'm rotated downward way too much. if I point the nose of the plane towards the red (X?) axis, I believe I need to rotate just slightly on the green (Y?) axis. if anybody can give me a really quick idea of how to do this in the smallest amount of code possible, I'll give you kisses and a copy of the finished vehicle.  for clarity sake, this is the code I have when I'm positioning myself. logically I'd think that the rotation code should fit in here somewhere as well, right? but I have no head for this so I could be totally wrong. as long as I sit in the right place I don't care what it says.  thanks! stuntparams() { llSitTarget(<0.3, -0.0, 0.35>, ZERO_ROTATION); llSetSitText("Fly"  ; llSetCameraEyeOffset(<-20.0, 0.0, 10.0>  ; llSetCameraAtOffset(<0.0, 0.0, 0.0>  ;
|
Pete Fats
Geek
Join date: 18 Apr 2003
Posts: 648
|
11-25-2004 03:04
Say you want to add 15 degrees to the Y axis, you would use:
llSitTarget(<0.3, -0.0, 0.35>, llEuler2Rot(<0,15,0> * DEG_TO_RAD);
|
Joshua Nightshade
Registered dragon
Join date: 12 Oct 2004
Posts: 1,337
|
re:
11-25-2004 03:22
great, that worked!  you left a ) out though: llSitTarget(<0.3, -0.0, 0.4>, llEuler2Rot(<0,-20,0> * DEG_TO_RAD)); thanks a lot!
|