#server only collision events for non ghosts in 1.0.8

1 messages · Page 1 of 1 (latest)

crimson tendon
#

For testing I created an empty scene which just contains 2 objects that are setup to invoke collision events. In addition i have a system that schedules an ICollisionEventsJob. If I don't include the Netcode package, my job finds collision events but as soon as I add it, it stops working.

in the docs of the Netcode package I found this paragraph about the Physics integration:

Does this mean I need to setup a new physics world to get server only physics (without ghosts)? What does the part To run the physics simulation only locally for certain objects some setup is required. mean?

There is another subchapter Multiple physics worlds which explains how to setup additional physics worlds but it only mentions client-only physics worlds.

young arch
#

Hey Dot,
No, it is not necessary to create another physics world.
This is mostly a limitation/bug of the current implementation.

When the Netcode for Entities package is used, the PhysicsSystemGroup (and all its systems) is moved in the PredictedFixedStepSimulationGroup and runs as part of the prediction loop.
There is a special RateManager that regulate the physics group update that requires either:

  • At least one predicted ghost exist in the world
  • Lag Compensation is enabled.

If you don't have any dynamic physics object that need to be replicated, at the moment you need to use the NetCodePhysicsConfig authoring to enable "LagCompensation" to let the server run the physics systems