Jump to content

BrownBoxStudio

Resident
  • Posts

    81
  • Joined

  • Last visited

Everything posted by BrownBoxStudio

  1. llRotLookAt rotates the object while it's physical so thanks for that. Except Iv'e learned my script to get the velocities angle doesn't work. The reason I have having the arrow rotate while moving is so that the arrow looks like the arrowhead is weighted. I want the arrowhead to always remain forward. Basically I want +z axis to always face in the direction that the arrow is moving. How can I go about doing that? This is how I am getting the direction of Velocity. It doesn't seem to work and this is a bit over my head. rotation angleDif = llRotBetween(llRot2Fwd(llGetRot()), llGetVel());rotation rot = llGetRot(); llRotLookAt(rot+angleDif, 1.0, 0.4 );
  2. 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); } }
×
×
  • Create New...