Jump to content

Problem with rotation on simple self moving vehicle


darkstylerz
 Share

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

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

Recommended Posts

Hello, I got problem with making my guard vehicle work properly. Once I set it stationary, I can use dialog box to get avatar coordinates, and it will fire at anyone + turret follows them around.

I use this to get avatar position:

  vector target = llList2Vector(llGetObjectDetails(llList2Key(peopleK, person), [OBJECT_POS]), 0);

But once I make it moving (turn physics on), the rotation breaks and turret won't follow anything.

I know it does have something to do with root prim since this one works when stationary and when it have to update it's coordinates too fast it just loses it:

vector p = llGetPos();

         llLookAt(p + (target + <1.0, 0.0, 0.0> - p) / llGetRootRotation(), 3.0, 1.0);

I put this script in timer, for it to update on avatar position every 0.2s. I have no idea what other function I can use to make it rotate when physical.

 

Thank you for help.

Link to comment
Share on other sites

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