Hey guys, got a simple question. How can I get the height of an object over the terrain? Need to find a way to drop some skeletal meshes to the ground.
Considering ue uses heigthmaps for terrains, it would simply be a matter of sampling the height over the object, but cant find a way to do that.
Any help?
Anyone? I really need some help here. I looked at getting the heightmap texture from the proxy, but even when I thought I had some code figured out for that, discovered that the renderer module has no knowledge of the landscape module, so really stuck now
I’m not very familiar with the engine yet, but would a ray trace work to get your position on the map that is on the surface?
Sampling the heightmap directly will be faster, but that should be acceptable. Any suggestion on how to do the raytracing?
Thanks, I’ll take a look. I didn’t googled before cause I wanted to do it with just the heightmap, as there a are a lot of objects I need to place every frame, about 10.000, and with the heightmap is just finding the pixel that corresponds to the object position and set the object height to that