You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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