Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Facing wrong way when Teleporting

Doctor Hickman
Registered User
Join date: 16 Oct 2006
Posts: 15
02-04-2007 09:02
I have a smal script for teleporting. When the AV arrives they are facing backwards - is there a way I can get the AV to be facing 180 degrees in their landing position. I assume it is something to do with 'zero_rotation' . Thanks.


vector targetPos = <183,162,23>; //The target location

reset()
{
vector target;

target = (targetPos- llGetPos()) * (ZERO_ROTATION / llGetRot());
llSitTarget(target, ZERO_ROTATION);
llSetSitText("Teleport";);
}
default
{
state_entry()
{
reset();
}

on_rez(integer startup_param)
{
reset();
}

changed(integer change)
{
llUnSit(llAvatarOnSitTarget());
reset();
}
}
Luz Melbourne
Registered User
Join date: 26 Nov 2006
Posts: 9
02-04-2007 15:21
From: Doctor Hickman

llSitTarget(target, ZERO_ROTATION);


I believe that would be:

llSitTarget(target, llEuler2Rot(0, 0, 180));

Someone correct me if I'm wrong.
_____________________
-----
Luz Melbourne
(Who speaks neither Spanish nor Australian.)