Download

finding the lowest Z value of an object

I’m trying to find the lowest point of a static mesh that could be rotated. It has a collision box and is a simple cube. I’m trying to find the lowest point. Any ideas?

You could do the math based on the object bounds and it’s orientation - this could be off by some amount if the object is spherical or irregularly shaped.

You could also run a box trace from underneath the object to find the lowest point, which would potentially be accurate in more cases but it probably a bit more expensive to do.

Hello,
In a recent thread about dice most interesting solutions were to use or boxes with no collision set in center of each dice face, or set sockets in this center and when dice launched, wait for speed = 0, then check all boxes / sockets location. The lowest z is the face down, the opposite face is the result (by naming each box / socket with the value of the opposite, you immediatly have your result.

Awesome, That’s for the responses.

Hyperloop, That’s the path I’m currently taking. I’m doing it in construction scripts so it’s my understanding that there should be any additional load during the game but I could be wrong about that.

Fen, I’ll definitely have to look into sockets. Sorry, but I haven’t used them yet. I’m using assets from the market place so hopefully it is possible to place sockets on a static mesh in the Engine.

You can attach sockets to skeletal mesh, just go to the skeleton and right click on a bone and you can chose to add a socket.

To create socket with a static mesh : https://docs.unrealengine.com/latest/INT/Engine/Content/Types/StaticMeshes/HowTo/Sockets/index.html