Jump to content

Object rezzed from HUD with offset and rotation


steph Arnott
 Share

You are about to reply to a thread that has been inactive for 3655 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Will this rezz the object in front of me on a stationary orbit of my rotation.E.G im at 45 ' will object rezz facing me and in front.

This script is in a HUD as is the object and notecard.


gOffSetList is by notecard e.g. <0.0,3.0,1.0>
gFormList is parsed form chooser menu

still do not know what the startParam actually does


Exterior_summon_call()
{
 string msg   =  (string)llList2String(gFormList,0);
 vector sumPos    =  llGetRootPosition();//llGetPos()
 rotation sumRot  =  llGetRootRotation();//llGetRot()
 vector offSet   =  (vector)llList2String(gOffSetList,1);
 vector Adjpos   =  sumPos + offSet * sumRot;
 vector speed   =  ZERO_VECTOR;
 rotation rot   =  sumRot * llEuler2Rot(<0.0,0.0,PI>);//180'
 integer startParam  =   llGetStartParameter();
 llSleep(10.0);
 llRezAtRoot(msg, Adjpos, speed, rot, startParam);
}

Link to comment
Share on other sites

The best way to find out, of course, is to try it yourself and se what happens.

If offSet is <0.0,3.0,1.0>, as you suggested, then llRezAtRoot will place your new object at a position that is 3.0m to the left of you and 1.0m above your body's center (waist, roughly), regardless of which way you are facing. That's what your variable Adjpos does.   In order to make the new object rez facing you, it should have a rotation

rotation rot = llEuler2Rot(<0.0,0.0,PI>)*sumRot;

ETA:  startParam is whatever you want it to be, in the context of your script. It is a way to pass information to the new object as an integer.  Without knowing how your script uses it, it's impossible to say what it means here.

Link to comment
Share on other sites

The final parameter in llRezAtRoot()/llRezObject() is simply an integer value of your choice that's passed to a script in the rezzed object (if there is a script there) for use if necessary.

So you might use it, for example,  to send a channel on which the rezzed object should listen for further instructions.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3655 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...