Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

rotation fun.....

Kain Cleaver
Registered User
Join date: 24 Jan 2006
Posts: 178
01-06-2009 17:52
ok..so i have a question..

how can i make it to where i use a sensor.. (1 time.. not repeated)
and make it 3m in front of the avatar... and at proper rotation?

this is what i have so far

listen(integer channel,string name,key ids,string str)
{
if (llGetOwnerKey(ids) == llGetOwner()){ llSensor("",(key)str,AGENT,512,2*PI);}
}
sensor(integer num)
{
target = num;
llSetPos(llDetectedPos(0)+ <3,0,0>;);
llGetCameraRot();
llSetRot(llDetectedRot(0));
}
}
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
01-06-2009 19:15
hopefully that helps
From: Kain Cleaver
ok..so i have a question..

how can i make it to where i use a sensor.. (1 time.. not repeated)
and make it 3m in front of the avatar... and at proper rotation?

this is what i have so far

listen(integer channel,string name,key ids,string str)
{
if (llGetOwnerKey(ids) == llGetOwner()){ llSensor("",(key)str,AGENT,96,2*PI);}//sensors only work up to 96meters, but llSetPos can only move up to 10 meters
}
sensor(integer num)
{
target = num;
llSetPos(llDetectedPos(0)+ <3,0,0>*llDetectedRot(0));//3 meters in front of the avatar's local rotation, it was global previously
llGetCameraRot();
llSetRot(llDetectedRot(0));
}
}
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369