How to tell if the player is inside a non-rectangular/non-spherical area?

The shape in question is a quadrilateral prism. There are four sides on the XY plane and a definite top and bottom on the Z. The figure can be any size or shape. There can be any number of them and can be anywhere on the map.

How can I tell if a player is inside one of them? If I can’t use box, sphere or capsule collisions, then what can I use?

The Blueprint has four points representing the vertices and four wireframe planes marking the edges. Is there any way to tell if something is on the reverse side of all four planes?


Example of cube-shaped field


Example of a non-cubed field (ignore the spline, that’s left over from an earlier version)

1 Like

With the modelling tools you can make meshes of an arbitrary shape into overlap volumes.

3 Likes

Good to know. But this only works in the editor. I want something that could be made in runtime. I am able to make the area a Dynamic Mesh as an extruded polygon, but collisions/overlaps only affect the outer edges. It triggers the ActorEndOverlap even when inside the area.

A workaround that I came up with is stacking a bunch of Dynamic Polygon meshes 10cm high (about the size of the smallest object) on top of each other. I’m sure there’s a better solution out there.

Unless there’s a Dynamic Volume component or a script that would extrude a trigger volume at an actor’s location at runtime that I don’t know about (there’s a lot about Unreal I don’t know about), please tell me.

Ah, runtime. I saw this, it’s a little old, but might point you in the right direction?