-
When I use .with(new PhysicsComponent()) to build an entity, and use this var player1 = spawn("player1", 0, 0,0); server.setOnConnected(conn -> to send entity to client that It can not move on client but can move on server. I mean I can control the entity on server by use client, but on client I can not see they move, and idea show this Failed to find updates: java.net.SocketTimeoutException: connect timed out (sorry about my terrible grammar) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
An entity with PhysicsComponent attached is managed by the physics world, not the game world. As far as I can remember, the network-based entities will only modify the game world coordinates. So a possible solution is to remove PhysicsComponent from the client-side since the logic should be done on the server side. Let me know if this makes sense. |
Beta Was this translation helpful? Give feedback.
An entity with PhysicsComponent attached is managed by the physics world, not the game world. As far as I can remember, the network-based entities will only modify the game world coordinates. So a possible solution is to remove PhysicsComponent from the client-side since the logic should be done on the server side.
Let me know if this makes sense.