What is my object resting on?

Hi there,

Started playing with objects using physics. As a long time physics programmer this is fun as a short term unreal programmer I’m a bit lost.

What’s the best way of querying what an object is resting on?

As always any help appreciated!

In an attempt to gather this information I created a physical box around the object that generates overlap events.

However I’m finding that as objects go to sleep querying for overlapped objects starts returning nothing.

Perhaps something is wrong with my first attempt to set this up. I’ve added a cube component as a child of the main mesh component. The image below shows the basic setup.

Hmmm, I enabled visibility in game and it seems like the OverlapGenerator flys off. Sometimes this happens early, sometimes later (about when the object comes to rest).

Its like it loses its attachment to main mesh, though I’m a bit hazy as to why it would or wouldn’t be attached in the first place.

Mmm…this is quite strange. I had a scan through the component hierarchy and also can’t find any function that lets you get what the component is based on. In Character you do have “GetMovementBase()” which will return the primitive component, but I doubt that’s enough to help you out.

You can also try using a trace to check what’s directly underneath a component.

In any case, if there really aren’t ways of getting this easily, I’d suggest logging a feature request as I’m sure this is a fairly general thing that many users would like.

Well - I got the overlap component to do what I want by updating its position and velocity to match the mesh during its tick.

Also found some old code of mine that was trawling through all primitive components to set velocity, add impulses etc, which might be bad.