You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-16 14:00:40 +00:00
Fix screen_accum not being reset when it should be in Input::VelocityTrack
Resets `screen_accum` like `accum`.
This commit is contained in:
@@ -253,13 +253,16 @@ void Input::VelocityTrack::update(const Vector2 &p_delta_p, const Vector2 &p_scr
|
|||||||
velocity = accum / accum_t;
|
velocity = accum / accum_t;
|
||||||
screen_velocity = screen_accum / accum_t;
|
screen_velocity = screen_accum / accum_t;
|
||||||
accum = Vector2();
|
accum = Vector2();
|
||||||
|
screen_accum = Vector2();
|
||||||
accum_t = 0;
|
accum_t = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Input::VelocityTrack::reset() {
|
void Input::VelocityTrack::reset() {
|
||||||
last_tick = OS::get_singleton()->get_ticks_usec();
|
last_tick = OS::get_singleton()->get_ticks_usec();
|
||||||
velocity = Vector2();
|
velocity = Vector2();
|
||||||
|
screen_velocity = Vector2();
|
||||||
accum = Vector2();
|
accum = Vector2();
|
||||||
|
screen_accum = Vector2();
|
||||||
accum_t = 0;
|
accum_t = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user