[sldev] How to move the avatar with finer, high precision increments?

Ettore Pasquini ettore_pasquini at 3dconnexion.com
Tue Mar 13 23:56:21 PDT 2007


On 3/13/07 10:18 PM, "John Hurliman" <jhurliman at wsu.edu> wrote:
> 
> High precision movement has been accomplished by libsecondlife team
> members but you have to use some tricks. Movement is done by sending
> AgentUpdate packets with simple status flags saying whether you are
> pushing forward/back/left/right/up/down/etc for basic movement. The
> trick is to look at your current velocity and do your basic equal and
> opposite reaction calculations to move the avatar in a direction and
> then stop on a dime. By setting the current rotation in AgentUpdate you
> can control which direction you are moving, and bringing it all together
> you can achieve precise movement. Maybe I can dig up some code on Monday.
> 
> John Hurliman

Thanks for your reply John.
I am not sure I understand exactly what you mean though. Are you saying I
should "push", then look at the velocity and maybe invert it? How am I
supposed to "stop on a dime" then?

I did try to mess with the velocity vector with horrible results so far.
Increasing the velocity resulted in a very quirky behavior and going through
walls (I know the viewer doesn't do collision detection).

If you know of some code that would be awesome.

Ettore



More information about the SLDev mailing list