Game Development Community

MovementSpeed

by gamer · in Torque Game Engine · 03/16/2007 (6:47 pm) · 6 replies

It seems that if I change $movementSpeed the player's speed doesn't actually change until I call moveForward(0), moveForward(1) again. can someone confirm this?
I am in a situation where I have to constantly adjust $movementSpeed from the client side. and constantly calling moveForward(0), moveForward(1) makes the animation jiggling.
any advise is welcome.
thanks!

#1
03/27/2007 (9:15 pm)
What are you trying to do? What kind of effect are you trying to achieve?

In the interest of trying to be productive, have you tried setVelocity?
#2
03/28/2007 (2:22 am)
You might want to have a look at this resource I submitted recently:

Dynamically change player speed in script

--Amr
#3
03/28/2007 (6:42 pm)
Actually my bad about the original post. player's speed(at least from the client side) changes immediately when I change $mvForwardAction which is the variable used in the engine to update player position at every tick.
thanks for the help guys. Amr, your resource is just like what I was doing, except that you are telling the client to update $mvForwardAction using commandToClient, where I just update $mvForwardAction directly.

A problem I noticed however, is that while the player runs smoothly on my local server&client, when I look at the player from another remote client, the running animation is jiggling due to the constant change of speed.
My requirement is simply to constantly updating player's speed and be able to reflect this view on my local client and also remote clients. Any idea how I can get this working well for the remote client?
thanks
#4
03/28/2007 (6:48 pm)
Actually my bad about the original post. player's speed(at least from the client side) changes immediately when I change $mvForwardAction which is the variable used in the engine to update player position at every tick.
thanks for the help guys. Amr, your resource is just like what I was doing, except that you are telling the client to update $mvForwardAction using commandToClient, where I just update $mvForwardAction directly.

A problem I noticed however, is that while the player runs smoothly on my local server&client, when I look at the player from another remote client using an advanced camera, the running animation is jiggling even when player's speed is constant.
any idea what might be wrong?
thanks
#5
03/29/2007 (12:41 pm)
Have you implemented this resource?:

www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=11218

Fixed all my networked player animation issues magically :-)
#6
03/29/2007 (1:49 pm)
Yes I just found out about this resource this morning, it worked like a charm
thanks!