Cleanup controller logic; tested more dot product stuff

This commit is contained in:
2026-11-06 18:00:33 -06:00
parent 6308ccb4fa
commit 324a01c165
8 changed files with 42 additions and 77 deletions
@@ -36,15 +36,16 @@ func process_jet_plan(jet: Jet) -> void:
var target_local_position: Vector3 = jet.to_local(jet.target.global_position)
var target_direction: Vector3 = target_local_position.normalized()
jet.target_ray.target_position = target_direction * 8
jet.target_ray.target_position = target_direction
#NOTE: When using unit (normalized) vectors, the result will always be
# between -1.0 (180 degree angle) when the vectors are facing opposite
# directions, and 1.0 (0 degree angle) when the vectors are aligned.
var forward_dot: float = target_direction.dot(Vector3.UP)
var ud_dot: float = target_direction.dot(Vector3.FORWARD)
var lr_dot: float = target_direction.dot(Vector3.RIGHT)
print(rad_to_deg(cosh(forward_dot)))
jet.controller.cpu.yaw_left()