Programmatically snapping spawned meshes to surface

Hello,

We would like to be able to spawn a mesh and allow the player to move it around, but keep it attached to ground.

What would be the simplest way to achieve this?

Thanks in advance.

Hi,

When you attach actor to another actor with no physics simulation, attached actor has no physics too, even if it has checked option Simulate Physics. Describe please what behavior you would like to achieve. If you want to get actor always on same height, you can try to lock z-axis (property Locked Axis in Physics category).

Best regards,

We are looking to allow the player to spawn a building onto a map. While placing the building, it should be “rooted” to the ground while it is moved around and finally placed. What would be the best way of doing this?

Thanks in advance for your help

Hi drone.ah,

Sorry for a long delay. I see what you are talking about now. For snapping spawned meshes to surface, you can try next:

Best regards,

I was hoping there was some way to use the physics to determine how to place it, but your solution should be fine… Thank you… :smiley: