Accessing underlysing simulation and directly injecting entites there. #641
-
|
In my case I would need to load a URDF model with rapier_urdf and links, bodies and colliders to rapier instance of bevy_rapier only to sync transformation every step, avoiding injecting revy_rapier component to bevy entities. What should I do in that case? Converting RapierCollider -> BevyCollider -> RapierCollider seems like a bad idea. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
It turns out you just can mut q_rapier_context: Query<(
Entity,
&mut RapierRigidBodySet,
&mut RapierContextColliders,
&mut RapierContextJoints,
)>, |
Beta Was this translation helpful? Give feedback.
-
bypassing bevy_rapier componentsIf I understand correctly, you want to bypass using bevy_rapier components to only synchronize their transforms: bevy_rapier's transform synchronization from rapier to bevy is happening in bevy_rapier/src/plugin/systems/rigid_body.rs Line 403 in c5634a5 As you can see it's quite tied to all those components, you may get away with copying only what you need, but be aware that's not a usecase much tested (see drawbacks). using bevy_rapier componentsIf you want to create a So a counterpart to DrawbacksStudying the above code might give information about how to achieve that, but adding external rigidbodies to Also, obviously other propagations from bevy to rapier will not work without additional effort. Alternatives
|
Beta Was this translation helpful? Give feedback.
It turns out you just can