Hi Paul
In your SimplePhysics system in server side inside BodyContainer
when detecting any entity with these components (which contains both static and mobile entities)
public BodyContainer( EntityData ed ) {
super(ed, Position.class, MassProperties.class, SphereShape.class);
}
You add BodyPosition components for all (both static and mob entities) in BodyPositionPublisher
@Override
public void addBody( Body body ) {
// The server side needs hardly any backlog. We'll use 3 just in case
// but 2 (even possibly 1) should be fine. If we ever need to rewind
// for shot resolution then we can increase the backlog as necessary
BodyPosition bPos = new BodyPosition(3);
// Note: we could have also initialized the body position here but
// we've already done it in SimplePhysics's EntityContainer.
ed.setComponent(body.bodyId, bPos);
}
Shouldn’t we add it only for mob entities ?
Doesn’t this cause ZoneManager to send update for all entities both mobs and statics ? Or ZoneManager only listens to PhysicsObserver
changes ?