Chaz Longstaff Posted May 20, 2013 Share Posted May 20, 2013 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 More sharing options...
DoteDote Edison Posted May 20, 2013 Share Posted May 20, 2013 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 More sharing options...
Innula Zenovka Posted May 20, 2013 Share Posted May 20, 2013 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 More sharing options...
Chaz Longstaff Posted May 21, 2013 Author Share Posted May 21, 2013 Thanks all. And yep the llRezAtRoot -- good reminder, that really helped to do the trick! Cheers. Link to comment Share on other sites More sharing options...
Recommended Posts
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