Need advice on Multiplayer collision


I have a network game that uses quakeworld style physics. Predict on clients and simulate on server, with server simulation able to correct past predictions on clients. I use CharacterControl. Ie, on clients the local player is a CharacterControl and enemies are just spatials. On server all players are CharacterControls that i just feed with client movement commands. They are created like this:
val tank = new Node(“Tank”)
tank.setUserData(SceneGraphUserDataKeys.Player, ps)
val capsuleShape = tankCollisionShape
val capsuleShapeGhost = new CapsuleCollisionShape(0.4f, 0.4f, 1)
val playerControl = new CharacterControl(capsuleShape, 0.1f)
playerControl.setPhysicsLocation(new Vector3f(0, 2.5f, 0));
val ghost: GhostControl = new GhostControl(capsuleShapeGhost)
ghost.setCollideWithGroups(PhysicsCollisionObject.COLLISION_GROUP_01) // Level
Apart from that i have projectiles in collision group 3 (that collides with 1 and 2).

This all works swell! The last thing i need to fix is player-vs-player collision in the server simulation. I guess charactercontrol-vs-charactercontrol? Does someone have a good strategy for that? Right now player just walk through each other… so there is no collision handling going between them at all.

PS. Optional question: Also, if enemies on the client are just spatials. Can i take advantage of that and get some nice “for looks” spatial-vs-charactercontrol collision there? DS.

Currently im on jme3 from 20121220.

If you upgrade to the jME nightly build you can check out BetterCharacterControl, it’s meant to replace the CharacterControl. I haven’t had a chance to test it yet, but I don’t think they are able to pass through each other


It does handle bettercharactercontrol vs bettercharactercontrol collisions. Good work!