Bike falling through terrain using JGN


I have no idea why this happens: all motorbikes in the multiplayer game are falling through the terrain on both client and server game. I can’t see a error of coding ATM.

(In singleplayer mode the bike works…)

The following screenshot shows that the bikes are falling through the terrain (right one also a bit later):

I tried to find an error by changing the update intervall for the SynObjectManager.

A value of 1 results in no error but all bikes fall through the terrain.

A value of 60 results in an imediately ODE Internal Error 2 with collision something… which I havent screened and there is sometimes error 0 and 1:

My Motorbike uses collision goups, jme 1.0 and JGN. The current situtation is that the bikes are spawned at differnet places, decided by the server… to prevent collisions at the start…

I synchronize the bike and its physic by synchronizing every dpn of the bike and all its properties (velocity, position, roation)

What could be the problem? Might it be impossible to synchronize a physics in network?

Is it possible to only synchronize the position of the bike thus nevertheless the physics collisions are working?

The ODE erros are caused by modifying the physics data while ODE computes a simulation step. Make sure you use proper locks for your threads and do not modify the physics data in callbacks.

Of course it is possible to use JGN with physics. Darkfrog made a ballgame with physics and JGN. Though, I don't know why it does not work with your code.

maybe you could use an updatecallback to the jmephysics to receive your infos

Are you using the jME-Physics-Networking API I wrote for use with JGN or did you write something special?  You should be able to easily migrate towards physics by taking the existing flagrush networking example and migrate it into physics and switch to using jME-Physics-Networking instead of the jME-Networking API.

Never seen those ODE errors myself either…are you perhaps making changes to the physics objects outside of the ODE thread?