mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Make Axe Spin More Realistic
This commit is contained in:
parent
b0458bb21c
commit
1d2ccd5762
@ -62,8 +62,13 @@ impl CharacterBehavior for Data {
|
||||
let mut update = StateUpdate::from(data);
|
||||
|
||||
if self.static_data.is_helicopter {
|
||||
update.vel.0 = Vec3::new(0.0, 0.0, update.vel.0.z + GRAVITY * data.dt.0)
|
||||
+ data.inputs.move_dir * 5.0;
|
||||
let delta_vel_z = if update.vel.0.z > 0.0 && update.vel.0.z <= 1.0 {
|
||||
GRAVITY * data.dt.0
|
||||
} else {
|
||||
0.0
|
||||
};
|
||||
update.vel.0 =
|
||||
Vec3::new(0.0, 0.0, update.vel.0.z + delta_vel_z) + data.inputs.move_dir * 5.0;
|
||||
}
|
||||
|
||||
// Allows for other states to interrupt this state
|
||||
|
Loading…
Reference in New Issue
Block a user