Jump to content

Need Help~thank you,about collision


Wang Novelli
 Share

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

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

Recommended Posts

somebody help me ,i want to In the collision llRezObject a object. i try it,but no llRezObject,i dont know why?

 

collision_start(integer num_detected)
{
vector myPos = llGetLocalPos();
rotation myRot = llGetLocalRot();
vector rezPos = myPos+relativePosOffset*myRot;
vector rezVel = relativeVel*myRot;
rotation rezRot = relativeRot*myRot;
llRezObject(llGetInventoryName(INVENTORY_OBJECT, 0), rezPos, rezVel, rezRot, startParam);
}

collision(integer num_detected)
{

 

vector myPos = llGetLocalPos();
rotation myRot = llGetLocalRot();
vector rezPos = myPos+relativePosOffset*myRot;
vector rezVel = relativeVel*myRot;
rotation rezRot = relativeRot*myRot;
llRezObject(llGetInventoryName(INVENTORY_OBJECT, 0), rezPos, rezVel, rezRot, startParam); 

 

}

These are not

 

 

Link to comment
Share on other sites

You still seem to be having trouble understanding the difference between LOCAL position and rotation and REGIONAL position and rotation.  When you want to rez and object, you need to specify location and rotation in REGIONAL coordinates.  See http://wiki.secondlife.com/wiki/Viewer_coordinate_frames#Coordinate_frames

and http://wiki.secondlife.com/wiki/LlRezAtRoot

If you make the mistake of specifying local coordinates, usually nothing will happen because you will be specifying a location that is more than 10m from your rezzer -- and therefore an invalid position.

Link to comment
Share on other sites

THX~~BUT I Don't understand, when i put them in touch_start ,it can be Rez. the same script

 

 touch_start(integer num_detected)
{
vector myPos = llGetLocalPos();
rotation myRot = llGetLocalRot();
vector rezPos = myPos+relativePosOffset*myRot;
vector rezVel = relativeVel*myRot;
rotation rezRot = relativeRot*myRot;
llRezObject(llGetInventoryName(INVENTORY_OBJECT, 0), rezPos, rezVel, rezRot, startParam); 
}


 

Link to comment
Share on other sites

thx,You are too great

vector myPos = llGetPos();
rotation myRot = llGetRot();

vector rezPos = myPos+relativePosOffset*myRot;
vector rezVel = relativeVel*myRot;
rotation rezRot = relativeRot*myRot;

llRezAtRoot(llGetInventoryName(INVENTORY_OBJECT, 0), rezPos, rezVel, rezRot, startParam);

Link to comment
Share on other sites

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