|
|
|
@ -38,10 +38,10 @@ pub fn run_physics(
|
|
|
|
|
Some(handle) => handle,
|
|
|
|
|
};
|
|
|
|
|
if collider.collider_handle == None {
|
|
|
|
|
let handle = physics_state.colliders.insert(
|
|
|
|
|
let handle = physics_state.colliders.insert_with_parent(
|
|
|
|
|
collider.collider.clone(),
|
|
|
|
|
//rigid_body_handle,
|
|
|
|
|
//&mut physics_state.bodies,
|
|
|
|
|
rigid_body_handle,
|
|
|
|
|
&mut physics_state.bodies,
|
|
|
|
|
);
|
|
|
|
|
collider.collider_handle = Some(handle);
|
|
|
|
|
}
|
|
|
|
@ -106,6 +106,8 @@ pub fn update_models(
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
|
|
// Make sure all the entities we care about are added to the system
|
|
|
|
|
// TODO add scenegraph component to compare against
|
|
|
|
|
// allows per node rotation, better logging
|
|
|
|
|
let mut query = <(&mut Collider, &mut Physics, &mut Mesh, &mut Position)>::query();
|
|
|
|
|
for (collider, physics, mesh, position) in query.iter_mut(world) {
|
|
|
|
|
let pos = physics_state
|
|
|
|
|