Hi, I’m fairly new to unity (and 3D geometry), and I apologize if I misuse any terms, or if this question has been asked in a different way.
I would like to know how to get just the lateral / perpendicular / tangential component of the difference between two Vectors. I’ll explain:
if Velocity is (2, 2, 0)
and Acceleration is (1, 1, 1)
the LateralComponent is (0, 0, 1))
A ball is skidding North on ice (Velocity). It can try to roll (Acceleration) but if it tries to roll North it doesn’t speed up. However if it tries to roll north-west, it speeds up towards the west (LateralComponent).
Simpler example: Lateral component is your sideways movement when trying to run against a wall in an FPS.
Is there a good way to get this? I can only figure out how to get the difference:
Difference = Acceleration - (Vector3.ClampMagnitude(Velocity, Acceleration.magnitude));
Any guidance is much appreciated.