QUICK DEV TIP #100 UE4 / UE5 - Snap To Surface

Today’s tip is great for people building out levels!

Did you know you can snap assets to surfaces in Unreal?

If you would prefer to watch my video version, check it out here

So this setting isn’t on by default. Normally if you drag an asset around it will intersect other meshes as you can see below.

 

However, if we go to the top right of our editor viewport, and click the button with 3 arrows on it, we get a dropdown appear. Here we can turn on Surface Snapping.

 

If we now drag our asset around by grabbing the white ball at the center of the move transform (so we can move in all 3 directions) you can see that we are snapping to the surface, which is super useful.

 

The settings by default are really good but there are a few we can play with. The first is Rotate To Surface Normal, which is toggleable on and off.

 

If we turn this off then as you can see in the GIF below, the asset will snap in transform to the different surfaces but it will remain in its original rotation. It will keep its rotation instead of adapting to the normal of the surface that it is on.

 

The second setting is called Surface Offset. This is a float value you can adjust.

 

This is great if your pivot is not at the bottom of your asset. For example Unreals default cube has its pivot in the center of the asset as you can see in the GIF below. So we are snapping to the surface but we are still intersecting the mesh.

 

If we set the Surface Offset value to 50 (the distance between the center pivot and the edge of the asset) you can see in the GIF below, it is now flush with the surface as we move it around.

 

This hasn’t changed in Unreal Engine 5 as well. We have exactly the same extra functionality of Rotate to Surface Normal and Surface Offset.

Snapping is a great thing to know about when you are building out levels and it can really help to make things easier and faster, you should definitely give it a try!


If you want more quick tips & tricks
FOLLOW ME ON TWITTER @cbGameDev

Also, check out the parkour game I'm solo developing called Freerunners. Give it a wishlist if you like the way it looks!: https://store.steampowered.com/app/1430330/Freerunners/