RobustToolbox icon indicating copy to clipboard operation
RobustToolbox copied to clipboard

You can't create an entity and attach joints to it in the same tick

Open Elijahrane opened this issue 2 years ago • 0 comments

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: image image image

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.

image image

This looks promising. We haven't tried to add the joint yet and we can see both entities are on map 1. image 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. image Our entity is in nullspace again somehow.

Elijahrane avatar Jul 19 '22 08:07 Elijahrane