Placing Part onto Terrain

Hey there.

I’m working on a system that will lay a part down on top of terrain, or at least align the center of said part with the terrain’s surface.

Not necessarily asking for code as I can likely code it myself, but what’s the best way of going about doing something like this? Is there an easy way to detect the surface of terrain?

1 Like

Kind of. You can read Voxels which gives you a lot of data about terrain, but it probably won’t be what you want. Raycasting is probably your best bet. It tells you where the terrain you hit is, as well as the direction it’s facing (the normal) you’ll need to use multiple rays if you want better accuracy.

2 Likes