Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

rez a object woes

wholesale Bing
Registered User
Join date: 27 Jun 2007
Posts: 24
01-23-2008 17:41
hi all

iv been trying all day to get a object to rez at a rotation relitive to the base prim that it lives in


i have made a teleporter hub ,when you walk into it a transporter rezzes ready for use ,that all works fine ,but the transporter is out of possition ,if the hub is rotated when rezzed out of my inventory

god this is hard to explain let alone do :-) ,

p.s the hub is a multi primed and linked , and the rezzed object is two linked prims









been using this code





CODE


//Rez an object on touch
string object = "Object";//Object in inventory
integer start_param = 10;
rotation rot;

default
{
state_entry()
{
rot = llEuler2Rot(< 0, 90, 90> * DEG_TO_RAD);
}
touch_start(integer a)
{
vector vec = llGetPos() + < 0.0, 0.0, 1.0>; // 1 meter above this
vector speed = llGetVel();
llRezAtRoot(object, vec, speed, rot, start_param);
}
}
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
01-23-2008 18:12
Try this instead:

rot = llEuler2Rot(< 0, 90, 90> * DEG_TO_RAD)*llGetRot();
vec = llGetPos() + < 0.0, 0.0, 1.0>*llGetRot(); // 1 meter "above" this
wholesale Bing
Registered User
Join date: 27 Jun 2007
Posts: 24
thank you
01-24-2008 01:55
that works , thank you ,you have to reset the script after you have moved it but im sure there is a reset command in sl script so not a issue ,many thanx again