Well that’s the point, when I comment out the Ghost() statement, suddenly everything becomes visible, which makes no sense unless it would be removed from the Physics Container where it got displayed from earlier on.
Code was this btw:
ed.setComponents(result, ObjectTypes.pickupHealthType(ed), new SpawnPosition(position),
new Position(position.x, position.y, position.z), ShapeInfos.boxInfo(ed), new Ghost(Ghost.COLLIDE_DYNAMIC));
What I’ve suspected, could it be that Ghost implicitly adds a BodyPosition and so it’s moved from the ModelContainer to the MobsContainer?
Edit: Yep, that’s it: Evidence from the Log:
ModelContainer.addObject(Entity[EntityId[4], values=[ObjectType[type=2], Position[location=Vec3[30.0, 4.0, -40.0], facing=Quatd[0.0, 0.0, 0.0, 1.0]]]])
00:06:02,513 INFO [MessageDebugger] Received:StringIdMessage[id=null, string=pickupHealth]
ModelContainer.updateObject(Entity[EntityId[4], values=[ObjectType[type=2], Position[location=Vec3[30.0, 4.0, -40.0], facing=Quatd[0.0, 0.0, 0.0, 1.0]]]])
MobContainer.addObject(Entity[EntityId[4], values=[ObjectType[type=2], BodyPosition[null]]])
Obviously I’ve truncated the log and there are many MobContainer.add’s with BodyPosition null, but those probably get published by the systems in place usually but not for ghosts. Not sure if I should go with 2 entities or ensure that a ghost entity is updated like regular physics systems
Edit: According to the BodyPositionPublisher.java, the ghost object should be getting a proper BodyPosition, just like a Mob.
Further Investigation shows that in Mob#updateSpatial the PositionTransistion is null due to an empty buffer, but BodyPositionPublisher is adding Frames to the BodyPosition, so I don’t get why that happens, furthermore making the ZoneNetworkSystem update the entity doesn’t work either, so essentially: How can I keep supplying BodyPositions? [In my use-case they won’t change anyway so the network would prevent them from being transmitted]