Zero Vector along Axis relative to another Vector
Hi,
Apologies if this has already been answered, I can't seem to find the correct wording to describe what I want to achieve and thus decided it was better to ask for myself.
I need to know how to zero-out a vector on a given axis, meaning that it should behave similar to this:
Vector = 1,2,1 Normal = 0,1,1 Result = 1*0, 2*1, 1*1 = 0,2,1
However, whilst I know how to do this for simple Normals such as the one given above... I cannot figure out how to do it for something more complex.
The scenario I wish to apply this in is to calculate the displacement of vertices from a given central point, when a collider is impacted by an object. Thus, the object can hot at any angle and the direction for displacement can be anything from 1,0,0 or 1.1,3.4,0.3, and so on.
Basically I wish to only displace sideways from the impact point, as opposed to also moving the vertices away from the impact point... If that makes sense? I can draw a diagram of exactly what I wish to achieve if it's unclear!
Thanks, Liam
Your answer
