fix up/downward thrusters

This commit is contained in:
yuni 2024-03-29 00:09:00 +01:00
parent 4111f16454
commit 880f92611a

View file

@ -140,8 +140,9 @@ fn run_camera_controller(
engine.thrust_back
});
let right = *transform.right() * engine.thrust_sideways * engine.current_warmup;
let up = *transform.up() * engine.thrust_sideways * engine.current_warmup;
actor.v += controller.velocity.x * dt * right
+ controller.velocity.y * dt * Vec3::Y
+ controller.velocity.y * dt * up
+ controller.velocity.z * dt * forward;
controller.velocity = Vec3::ZERO;