Download

Determine whether a point is inside a mesh of any shape

I currently have a room system (3D) in my level and I need to determine which room my player is in. To avoid being in 2 rooms at the same time, I only look at the “center” of my player. However, I can’t find any documentation to know if a point is in a mesh. I only found Is Point In Box but that is not enough for me.

Here is my blueprint :

I have read that there is a method called Point in Polygon which counts the number of intersections between a vector from the point and the mesh (Point in polygon - Wikipedia). However I have no idea how to do this in blueprint.
https://en.wikipedia.org/wiki/Point_in_polygon#/media/File:RecursiveEvenPolygon.svg

Just use sphere trace with a low radius, like 1

Why not just:
a. Trace down to the floor (or use “Current Floor”) and get the room through the actor name, tag, or material.
b. Have triggers at the doors that set the current room the player is in.

1 Like

Unfortunately I can’t, my scene is not predefined and I import my assets from a file (.obj). I can extract the information of the role I gave to my mesh but not more. I need to have an adaptive system that recognizes the volume my actor is in.
Also, my actor can fly and walk through walls, so he can arrive from any place.