Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llSetPos and llSetRot in a sensor

Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
12-06-2008 15:31
this is probuly just my stupidity talknig but im trying to have a object set its pos and rotation to the exact same as the detect objects location here is what i have, it sets its pos but not its rotation


CODE

default
{
state_entry()
{
llSensorRepeat("Gun Pos","",SCRIPTED,12, PI,5);
}
sensor(integer num_detected)
{
llSetPos(llDetectedPos(0)+<0,0,.4>);
llSetRot(llGetRot());
}
//no_sensor()
//{
//llOwnerSay("No in range.");
//}
}
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
12-06-2008 16:11
It's llDetectedRot(0) you want there then, right? The llSetRot(llGetRot()) shouldn't do much…