CODE
integer hit;
rotation arot;
vector apos;
default
{
state_entry()
{
llPassCollisions(TRUE);
llSetStatus(STATUS_PHYSICS, TRUE);
llSetStatus(STATUS_PHANTOM, FALSE);
}
collision_start(integer detected)
{
arot = llGetRot();
apos = llGetPos();
llSetStatus(STATUS_PHYSICS, FALSE);
llTriggerSound(llGetInventoryName(INVENTORY_SOUND, hit), .5);
llSetStatus(STATUS_PHANTOM, TRUE);
llListen(0,"", llGetOwner(), "pickup");
llListen(0,"", "", "id");
llSetPos(apos);
llSetRot(arot);
//put score stuff here
}
That's not all of the script, but the rest of it doesn't matter and believe me is not causing the problem.
The problem is it hits the wall and bounces before having physics toggled off and phantom toggled on, resulting in a very strange angle and not the bow looking like it is stuck into the wall.
I figured by making the script get the rotation and position of the object right as it hits the wall and then reassigning that position and rotation at the end of the collision_start event, it would readjust the rotation, however it still gets some 'bounce' in before assigning them to the variables. Even if that DID work, it would be an undesirable effect as it would bounce and then realign itself, instead of smoothly going into the wall. If anyone has any advice or suggestions please reply here or send me a message in-game.
