mirror of
https://github.com/Relintai/godot-steering-ai-framework.git
synced 2024-11-22 13:07:58 +01:00
Fix angular velocity clamped to accel
This commit is contained in:
parent
5b5ca11b03
commit
53cad0f660
@ -6,6 +6,7 @@ This document lists new features, improvements, changes, and bug fixes in every
|
||||
|
||||
- Removed the demos repository and brought demos back into main repo
|
||||
- Added a repository with just the files for [submodule](https://github.com/GDQuest/godot-steering-ai-framework-submodule) usage.
|
||||
- Fix a bug in GSAIKinematicBody2DAgent and GSAIKinematicBody3DAgent where angular velocity was clamped using max acceleration instead of max speed.
|
||||
|
||||
## Godot Steering AI Framework 3.0.0
|
||||
|
||||
|
@ -92,8 +92,8 @@ func _apply_orientation_steering(angular_acceleration: float, delta: float) -> v
|
||||
|
||||
var velocity = clamp(
|
||||
angular_velocity + angular_acceleration * delta,
|
||||
-angular_acceleration_max,
|
||||
angular_acceleration_max
|
||||
-angular_speed_max,
|
||||
angular_speed_max
|
||||
)
|
||||
if apply_angular_drag:
|
||||
velocity = lerp(velocity, 0, angular_drag_percentage)
|
||||
|
@ -106,8 +106,8 @@ func _apply_orientation_steering(angular_acceleration: float, delta: float) -> v
|
||||
|
||||
var velocity = clamp(
|
||||
angular_velocity + angular_acceleration * delta,
|
||||
-angular_acceleration_max,
|
||||
angular_acceleration_max
|
||||
-angular_speed_max,
|
||||
angular_speed_max
|
||||
)
|
||||
if apply_angular_drag:
|
||||
velocity = lerp(velocity, 0, angular_drag_percentage)
|
||||
|
Loading…
Reference in New Issue
Block a user