|
Aniam Ingmann
llOwnage(float pwnage);
Join date: 22 Oct 2005
Posts: 206
|
10-05-2007 21:52
I'm making a script so that you press a button and it move you forward 10 m (on the same z.axis plane) but along the x,y axis. How would I do this? So far I have this set up when a certain linked message is said.: if (str=="moveforward") { destination = llGetPos()*llGetRot()+<10,0,0>; range = 0.1; targetID = llTarget( destination, range ); llMoveToTarget( destination, .05); }
What would I do to alter this (piece) of my script into one which moves you forward, no matter which way i'm facing?
_____________________
From: someone Don't worry, Aniam is here! - Noob
|
|
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
|
10-06-2007 04:02
destination = llGetPos() + <10,0,0> * llGetRootRotation();
Or, instead of llGetRootRotation(), one could use llDetectedRot(0) passed from inside the touch handler.
|
|
Aniam Ingmann
llOwnage(float pwnage);
Join date: 22 Oct 2005
Posts: 206
|
10-06-2007 06:08
It worked! Thanks a bunch!
_____________________
From: someone Don't worry, Aniam is here! - Noob
|