Closed clinuxrulz closed 7 months ago
Probably another problem is add_rollback
would not of been called on the automaticly created child entities (those created by SceneBundle when using a gltf model).
And it would be had to know which components to track in the scene bundle. So the SceneBundle
use case would no longer be valid. I'll just go with the alternative model following player solution.
Will close this for now.
Is your feature request related to a problem? Please describe.
When a SceneBundle is used in a spawned entity (using gltf models for example) Child entities are automatically created. If there is a rollback between spawn and despawn, the entity id map between old/new IDs for Parent component and Children components is not updated leaving them pointing at possibly non-existent entities.
Describe the solution you'd like On rollback use the old/new entity ID map to update Parent and Children components. Or track child/parent relationship and spawn child entities where needed.
Describe alternatives you've considered Use a player entity without a SceneBundle and create a separate non-rollback entity with the SceneBundle that follows the player Tranform.