Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Nonphysical movement - Help!

Galena Qi
Registered User
Join date: 9 Sep 2006
Posts: 249
10-26-2007 12:59
I'm trying to script an automaton to walk straight ahead using

llSetPos(llRot2Fwd(llGetRot()) * forward);

Where forward is a float variable which I set to values between 0 and 1.

I put my script in the root prim of my object, and it causes the object to move to the right and downward. OK, so I checked my root prim and it had a different rotation from the object as a whole. I made a different prim the root - one that is oriented with the X-axis straight ahead on both world and object coordinates. Same result. Changing the llRot2Fwd to a llRot2Left made absolutely no difference - same behavior. I tried resetting the script, taking and re-rezzing the object, delinking and relinking the object, - no difference.

Can anyone tell me what I'm doing wrong? One possibility - I call the above line several times, after each frame in my automaton leg animation. Am I incrementing the rotation after each call?

Also, the distance traveled isn't changing with the value of forward. Does this function accept values <1?

Any suggestions would be appreciated. I don't have the script available right now, but could post it later.

(tired of chasing my creation around the sandbox)
Day Oh
Registered User
Join date: 3 Feb 2007
Posts: 1,257
10-26-2007 13:58
llSetPos(llGetPos() + llRot2Fwd(llGetRot()) * forward);

o.o
_____________________
Galena Qi
Registered User
Join date: 9 Sep 2006
Posts: 249
10-26-2007 15:21
[is extremely embarrassed at her mistake]