Jump to content

Rotation Help Please


Chaz Longstaff
 Share

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

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

Recommended Posts

Rotations are the one major thing that I will probably always suck at, just can't seem to get my mind around them fully. Oh well.


Can anyone help me with this?

 

The following works great, unless you rotate the prim  that items are being rezzed out of  (move it 90 degrees on Z for instance) -- then the items rezzed will rez out of place.

          //parameters coming in from a dialog menu system

           TargetVector = <0 + (float)tmpx, 0 + (float)tmpy, 0 + (float)tmpz>;

            llRezObject(ObjectName, llGetPos() + TargetVector, ZERO_VECTOR,llGetRot() , ch);

 

 

Link to comment
Share on other sites

Multiply the offset amount by llGetRot():

llRezObject(ObjectName, llGetPos() + (TargetVector*llGetRot()), ZERO_VECTOR,llGetRot() , ch);

 

I'm not sure what you're using as TargetVector, but that should be an offset from the position of the main object.. which doesn't really match the "TargetVector" variable name. In other words, if TargetVector is a region coordinate instead of an offset from the main object, your new object may not rez at all (with no warning message), since it's likely to attempt a rez too far from the main object.

Link to comment
Share on other sites

I would use llRezAtRoot rather than llRezObject, simply because it's easier to control.   Make sure, if you can, that the rezzer is rotated at ZERO_ROTATION when you take the initial measurements of offsets and rotations, since that makes the subsequent calculations simpler.

Then follow the second example in the wiki article on llRezAtRoot, which explains it all.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4031 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...