Vector3 inside Shape?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Sms_Gamer

How would I detect if a Vector3 is inside a shape?

I see many solutions for 2D physics, but I can’t find a solution for 3D physics.

Is there something like Geometry.IsPointInPolygon but for 3D Shapes instead?

I’m only using BoxShapes, although they are being rotated and scaled so using AABB isn’t a viable solution (unless there’s something I’m missing)

I’ve been at this for far too long now and decided it best to just ask

:bust_in_silhouette: Reply From: rossunger

A “simple” solution is to use a raycast from your Vector3 to any direction with a length as close to zero as possible.