Multiple Physical Worlds/Scenes? #287
Unanswered
lonegamedev
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is something I'm going to need, and I was wondering if this is a feature you would like to integrate with this plugin. I would rather extend existing plugin rather than re-invent the wheel. Rapier itself supports multiple world instances, so it shouldn't be a blocker.
My rough implementation idea:
Secondary simulations should be separate from main simulation, and it would be user job to implementing boundary crossing mechanisms (if needed).
We should keep one global physical simulation (as is), so this change would be backwards compatible.
We should be able to spawn entity, with
SecondaryPhysicalWorld
component attached.This would map back to resource, creating additional physical world. Any object belonging to this secondary world should have
RefSecondaryPhysicalWorld
component attached.Main physical world will just pick all entities without
RefSecondaryPhyscialWorld
.Secondary physical worlds would use appropriate
SecondaryPhysicalWorld
andRefSecondaryPhysicalWorld
.Order of execution shouldn't be important.
So, what do you think?
Beta Was this translation helpful? Give feedback.
All reactions