I have this code:
llRezObject("ROV2", llGetPos() + <-2.0,-4.0,2.0>, <0.0,0.0,0.0>, <0.0,0.0,0.0,1.0>, 0);
I want ROV2 to rez at 270 degrees on the z axis which one do I alter???
These forums are CLOSED. Please visit the new forums HERE
simple query |
|
|
Boris Eebus
Registered User
Join date: 8 Feb 2008
Posts: 45
|
05-14-2008 17:45
I have this code:
llRezObject("ROV2", llGetPos() + <-2.0,-4.0,2.0>, <0.0,0.0,0.0>, <0.0,0.0,0.0,1.0>, 0); I want ROV2 to rez at 270 degrees on the z axis which one do I alter??? |
|
Anti Antonelli
Deranged Toymaker
Join date: 25 Apr 2006
Posts: 1,091
|
05-14-2008 17:59
The rotation is this one: <0.0,0.0,0.0,1.0>
but it's in quaternions, which most mere mortals don't find possible to translate into normal X Y Z axes. Fortunately there's an LSL function to convert, llEuler2Rot http://www.lslwiki.net/lslwiki/wakka.php?wakka=llEuler2Rot You probably want something like this: llRezObject("ROV2", llGetPos() + <-2.0,-4.0,2.0>, <0.0,0.0,0.0>, llEuler2Rot(<0,0,270> , 0);--- *edit* the forum mangles this a bit as I look at it, it should be all in one line --- although I'm not in world to test so ymmv. Hope that helps some. _____________________
Designer of sensual, tasteful couple's animations - for residents who take their leisure time seriously.
![]() http://slurl.com/secondlife/Brownlee/203/110/109/ ![]() |
|
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
|
05-15-2008 08:16
The rotation is this one: <0.0,0.0,0.0,1.0> but it's in quaternions, which most mere mortals don't find possible to translate into normal X Y Z axes. Fortunately there's an LSL function to convert, llEuler2Rot http://www.lslwiki.net/lslwiki/wakka.php?wakka=llEuler2Rot You probably want something like this: llRezObject("ROV2", llGetPos() + <-2.0,-4.0,2.0>, <0.0,0.0,0.0>, llEuler2Rot(<0,0,270> , 0);--- *edit* the forum mangles this a bit as I look at it, it should be all in one line --- although I'm not in world to test so ymmv. Hope that helps some. That wont work, you have to convert the vector DEGREES to RADIANS first.... CODE
|
|
Anti Antonelli
Deranged Toymaker
Join date: 25 Apr 2006
Posts: 1,091
|
05-15-2008 18:29
Thanks Johan, I should have known I'd forget something obvious in my haste.
edit: or you could always just express the rotation in terms of pi ![]() _____________________
Designer of sensual, tasteful couple's animations - for residents who take their leisure time seriously.
![]() http://slurl.com/secondlife/Brownlee/203/110/109/ ![]() |
|
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
|
05-16-2008 00:38
Thanks Johan, I should have known I'd forget something obvious in my haste. edit: or you could always just express the rotation in terms of pi ![]() Yeah, I'd never even heard of quaternions before SL, (and you think you've heard of everything at some point), and quaternions are still a mathematical mystery to me, so, me, llRot2Euler() and llEuler2Rot() are good buddies, so I caught that pretty quick ![]() |