Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Setting Rot

Omen Torgeson
Registered User
Join date: 12 Jun 2004
Posts: 155
11-12-2004 01:56
This is a completely lame question. And I'm sure the answer is simple, but for one reason or another I'm overcomplicating the task at hand and am in a rut.

I'm trying to rotate a child prim and only on the x axis, and for some reason or another it is rotating all the axis'.

IE

llSetRot(llEuler2Rot(<-5,0,0>;));

It works, but screws around with the Y and Z as well setting them to 0. Yeah, plain as day right there, that's what I typed in isn't it? Well, I really just meant by 0: don't change a thing.

So my question is...what do I do instead of putting 0 there? Do I need to llGetLocalRot and use those results and add only the X axis change every time I change the rot of this prim.

BTW- Think wings here, I'm trying to make something flap up and down.

I'm in world right now as well, if you happen to be online and going online sometime soon. Otherwise, I'll keep checking the boards here for a reply.

Thanks :D
Kermitt Quirk
Registered User
Join date: 4 Sep 2004
Posts: 267
11-12-2004 06:31
Your problem is that llEulerToRot wants it's parameter in radians, and you're giving it in degrees. Try this...

llSetRot(llEuler2Rot(<-5,0,0> * DEG_TO_RAD));
Omen Torgeson
Registered User
Join date: 12 Jun 2004
Posts: 155
11-12-2004 07:41
Thank you Kermitt! I just logged out of world, so I'll give my script an update tomorrow. Appreciate the help. :D
Azelda Garcia
Azelda Garcia
Join date: 3 Nov 2003
Posts: 819
11-12-2004 17:22
Recommend using AxisAngle2Rot, it's intuitive and practically a quaternion (which is what SL uses internally).

Azelda
_____________________
Omen Torgeson
Registered User
Join date: 12 Jun 2004
Posts: 155
11-12-2004 20:26
Thanks Azelda,

Going to give that a try. The first suggestion didn't work unfortunately, so still stumped over this seemingly simple function I want to incorporate into my prims.

-Omen
Azelda Garcia
Azelda Garcia
Join date: 3 Nov 2003
Posts: 819
11-12-2004 21:48
btw, you probably want to use llSetLocalRot if its a child prim. Sortof semi-critical bit of info that :-O

Azelda
_____________________
Omen Torgeson
Registered User
Join date: 12 Jun 2004
Posts: 155
11-13-2004 01:14
From: Azelda Garcia
btw, you probably want to use llSetLocalRot if its a child prim. Sortof semi-critical bit of info that :-O

Azelda


Hehe yes. The original post was actually a misprint in that respect. I should have just copy/pasted from the script window, but I hashed it out on screen and completely didn't notice I'd used the regular function instead of local. :D Thanks for the info anyway, just incase that had been the situation.
_____________________
Max Schreck:
"I feed like an old man pees -- sometimes all at once, sometimes drop by drop."
-Shadow of the Vampire