It is a networked entity. They use a shared CreateVPhysics method to
initialize their physics objects to be identical. If the clientside
representation of an entity has its own vphysics object it will not
get forced changes from the server (which is what we want) but I can
use GetAbsAngles/Origin to get the proper server position. The idea
was to eventually use sendproxies to write out appropriate server
physics data (inertia's etc) to correct the client vphysics object.
Within the void CGameMovement::PlayerMove( void ) method I call a
simulate method on the players controlled entity, and look at the most
recent usercmd with
#ifdef GAME_DLL
cmd = pPlayer->GetLastUserCommand();
#else
cmd = pPlayer->GetCurrentUserCommand();
#endif
and then based on keys down (like IN_FORWARD) etc I apply thrust, and
use the mouse deltas to figure angular rotation, but the point is even
with a single keypress (I'm echoing the amount of times this method is
called) the client drifts longer than the server, so repeated
keypresses of left and right end up throwing the client object way out
of sync with the servers.
On 9/12/06, Robbie Groenewoudt <[EMAIL PROTECTED]> wrote:
--
[ Picked text/plain from multipart/alternative ]
The client and server have different times and ticks so it's quite possible
the 2 are different. Some more code would help.
Also, you should make it an networked entity so the client predicts it but
receives the right position from the server.
On 9/12/06, Maurino Berry <[EMAIL PROTECTED]> wrote:
>
> I'm attempting to simulate physics for an entity on the client as well
> as the server (a type of vehicle) Everything works fine except what
> feels like the 'drag' is different on the client/server, they're set
> to ignore gravity so they are hovering and a single boost with
> ApplyForceCenter/Offset results in different positions and I can't
> seem to figure out why, it's like the client has less air density
> almost, but I've made sure it's the same. Is the simulate rate of
> havok different between the client/server? or is there anything I
> should know about regarding this? Thanks.
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
--
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders