瀏覽代碼

:beetle: Fix walker rotation

DricomDragon 1 年之前
父節點
當前提交
f8800e4e55
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      first3d/component/entity/walker/walker.gd

+ 1 - 1
first3d/component/entity/walker/walker.gd

@@ -21,7 +21,7 @@ func trigger_jump() -> void:
 
 func trigger_direction(dir: Vector2) -> void:
 	target_rotation = -dir.x * turn_to_rad
-	var ground_velocity: Vector2 = Vector2.UP.rotated(global_rotation.y) * dir.y * speed
+	var ground_velocity: Vector2 = Vector2.UP.rotated(-global_rotation.y) * dir.y * speed
 	target_velocity.x = ground_velocity.x
 	target_velocity.z = ground_velocity.y