I have a project (first time with physics and movement) in which an agent sits on a ball. I then turn the ball physical and use llMoveToTarget to move it to several different waypoints. I had to use llSetStatus to disable rotation on all three axes because, without it, the ball and the agent spun around wildly in all directions. Everything works fine now, except that, as the ball reaches a waypoint and is sent on to the next waypoint, I need the ball to rotate (in a controlled manner) towards the next waypoint. It appears that llRotLookAt is the solution. But even though I have done alot of experimentation, I can't seem to get things working. I have two main questions about it.
First, it won't work with rotation disabled so, do I enable rotation, call llRotLookAt and then immediately disable rotation again now that it is facing in the right direction? Or, when llRotLookAt is used, does it lock the rotation down (like llSetStatus does) until it is called again?
Second, I'm not sure what I am supposed to use for the target argument (type rotation) for llRotLookAt. I have the position of the waypoint I'm at and I have the position of the next waypoint, but neither of these are rotations, they are positions - so I don't think I would pass either of them, right? Is there some calculation I do between the two position vectors to come up with the appropriate rotation vector?
Any help would be greatly appreciated.