add camera reset key
This commit is contained in:
parent
bb3aeae0bf
commit
7d28281781
2 changed files with 7 additions and 4 deletions
|
@ -68,7 +68,7 @@ fn spawn_bike(
|
|||
mut meshes: ResMut<Assets<Mesh>>,
|
||||
mut materials: ResMut<Assets<StandardMaterial>>,
|
||||
) {
|
||||
let pos = Vec3::new(0.0, 14.0, 0.0);
|
||||
let pos = Vec3::new(0.0, 5.0, 0.0);
|
||||
let xform = Transform::from_translation(pos); //.with_rotation(Quat::from_rotation_z(0.0));
|
||||
|
||||
let body_collider =
|
||||
|
@ -84,9 +84,9 @@ fn spawn_bike(
|
|||
SleepingDisabled,
|
||||
CyberBikeBody,
|
||||
CatControllerState::default(),
|
||||
ColliderDensity(0.5),
|
||||
AngularDamping(0.9),
|
||||
LinearDamping(0.2),
|
||||
ColliderDensity(0.6),
|
||||
AngularDamping(0.2),
|
||||
//LinearDamping(0.2),
|
||||
// LinearVelocity::ZERO,
|
||||
// AngularVelocity::ZERO,
|
||||
ExternalForce::ZERO.with_persistence(false),
|
||||
|
|
|
@ -48,6 +48,9 @@ fn update_camera_pos(mut offset: ResMut<DebugCamOffset>, mut keys: ResMut<Button
|
|||
offset.dist += 0.5;
|
||||
}
|
||||
}
|
||||
KeyCode::KeyR => {
|
||||
*offset = DebugCamOffset::default();
|
||||
}
|
||||
_ => continue,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue