RobustToolbox
RobustToolbox copied to clipboard
You can't create an entity and attach joints to it in the same tick
Every conceivable method of making sure that the entity and the entity you want to attach it to doesn't work.
Result immediately after adding a joint this way normally:
Hmmm. I tried moving this all to a component on the spawned entity, and subscribing to its startup, which should fire after it's completely initialized, including the entity itself, and all components including relevant ones like transform and physics.
This looks promising. We haven't tried to add the joint yet and we can see both entities are on map 1.
Nope, the entity we spawned is in nullspace again after we try to add it, despite just being on map 1.
I tried making a seperate system just for this that updates after physics and transform. So, after startup, which should initialize everything about the entity, and also after physics and transform run, which should ensure its map ID is correct.
Our entity is in nullspace again somehow.