For context, the problem I am trying to solve here is within game development - The player can move in 3D space (in any direction), but when near a wall, the player should not be able to move toward that wall. Instead they should move along a vector parallel to the wall, in the same general direction as the initial input. This is trivial - I take the dot product of the input vector and the normal of the plane we hit. If the result is positive the input is valid, and if not, the input vector plus the normal multiplied by the dot product result gives a satisfactory result.
A problem arises when we have more than one wall (plane) nearby. If we simply repeat the previous algorithm successively for each wall, It's possible to get a vector which does point toward one or more planes. What I would like to do instead, is to find the range of vectors (if there are any) which satisfy all planes involved.
I'm able to visualize it as each successive plane cutting a hemisphere off the unit sphere, with whatever shape remains being the range of valid output vectors. However, I'm not sure how to go about it mathematically. Of course, even if I could solve the problem this way, I would also need to find a way to remap the input to the desired range.
Does anyone have an idea of how this can be done?
Thanks again for the response!
– Peter D Sep 25 '20 at 17:08