How can you spawn an object on terrain ground level?

I have created an automatic sentry gun similar to the one in Team Fortress 2. My question is how do you make the sentry always spawn on the ground. The map has terrain with various hills and such so locking it to a specific height isn’t an option. Is Unreal Engine 4 able to tell how high the terrain is at a certain point in the world? Any help is really appreciated.

Thanks

Do a line trace for the ground, break hit result, and use hit location as your base vector.