Replies: 1 comment
-
bevy_rapier exposes the rigidbodyset, and you can retrieve a rigidbody handle previously created with bevy's helpers through But you're right, creating that from a An ideal solution would be to allow to create the rapier rigidbody yourself, and add the But I believe that is not a working solution currently, because we'd need to register than entity/rigidbody handle link within I think access to lower level rapier should be facilitated to allow more advanced uses, and ease maintainability, I'd welcome such a issue. |
Beta Was this translation helpful? Give feedback.
-
I'd like to adapt https://github.com/dimforge/rapier/blob/master/examples3d/vehicle_controller3.rs to use bevy- I think it could be wrapped in a new struct that is a bevy
Component
and I'd put that in a commands.spawn() for the vehicle, then ColliderSet/ImpulseJointSet/MultibodyJointSet arecontained in RapierContext so I would call DynamicRayCastVehicleController update_vehicle() from a bevy Update function that extracts the different sets from the rapier context to pass in.But I'm less clear about the initialization- there's a
let mut vehicle = DynamicRayCastVehicleController::new(vehicle_handle);
but where do I get the vehicle_handle from if bevy_rapier is creating the RigidBodySet for me- can I pull it from the return value of commands.spawn()? (That would mean I can't bundle the vehicle with the collider and mesh, it'd have to be put into bevy in a next step)Beta Was this translation helpful? Give feedback.
All reactions