acos(forward_dir.dot(target_dir)
angle in radian between the two vectors
acos(forward_dir.dot(target_dir)
angle in radian between the two vectors
/ state.step
basically times fps(e.g. divide by 0.016 = time 60), this is because angular velocity is a per second unit, engine subsequently will integrate this value by times delta again.
forward_dir.cross(target_dir)
a vector that will be the rotation axis, perpendicular to both vectors, and since they are unit vectors, this is sin(a). this means it will rotate to target direction faster if their angle are larger.
(target_position - current_transform.origin)
a vector point to target_position globally
(current_transform.basis * forward_local_axis)
transform forward_local_axis to point to the global x direction.
waiting for Godot
and out of nowhere, Beckett appears.