For the sake of this question, I have a single actor A with some form of collision enabled. Whether it’s a box, a sphere, or some arbitrarily complex mesh, I don’t know, nor do I know its approximate size. I only know it can be collided with. I also have a single point P in space.
How can I find whether or not P is contained within A?
I’m not in front of the editor so I can’t easily check, but this should be able to be done by:
- Getting the player’s collision component. You may need to check all types (box/sphere/capsule) - not sure.
- Once you have that, you should be able to do an overlap test with it against your point - you may need to use the raw parameters rather than calling a function on the component itself (i.e., get the size of box/radius of sphere/radius and halfheight of capsule).