From 5b5ca11b032dfd6f684fbcd9618abe441502e5bb Mon Sep 17 00:00:00 2001 From: volzhs Date: Tue, 8 Jun 2021 12:24:36 +0900 Subject: [PATCH] Fix global_position for KinematicBody3DAgent (#52) Use `global_transform.origin` instead of `global_position` --- .../Agents/GSAIKinematicBody3DAgent.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/godot/addons/com.gdquest.godot-steering-ai-framework/Agents/GSAIKinematicBody3DAgent.gd b/godot/addons/com.gdquest.godot-steering-ai-framework/Agents/GSAIKinematicBody3DAgent.gd index d406618..7ba1cc1 100644 --- a/godot/addons/com.gdquest.godot-steering-ai-framework/Agents/GSAIKinematicBody3DAgent.gd +++ b/godot/addons/com.gdquest.godot-steering-ai-framework/Agents/GSAIKinematicBody3DAgent.gd @@ -94,7 +94,7 @@ func _apply_position_steering(accel: Vector3, delta: float) -> void: velocity = velocity.linear_interpolate( Vector3.ZERO, linear_drag_percentage ) - _body.global_position += velocity * delta + _body.global_transform.origin += velocity * delta if calculate_velocities: linear_velocity = velocity