I'm creating a bow and arrow. I have a script that always has the arrow rotating so that the z axis is always facing in the velocity direction. The script works to set the rotation of the arrow but the script will not change the rotation if the arrow is physical. I'm not sure what I am doing wrong. Any help is appreciated. Thanks! My script: default
{
state_entry()
{
llSetTimerEvent(1);
llCollisionFilter("Target", NULL_KEY, TRUE);
}
collision_start(integer total_number)
{
llSetStatus(STATUS_PHYSICS, FALSE);
}
timer()
{
rotation angleDif = llRotBetween(llRot2Fwd(llGetRot()), llGetVel());
rotation rot = llGetRot();
//llOwnerSay((string) angleDif);
llSetRot(rot+angleDif);
}
}