How to get the normal vector of the terrain in a given world position?

I want to get the normal vector of the terrain in a given world position.

I don’t want to do raycasts since I’ll be repeating this operation a lot of times per frame.

I know the method GetInterpolatedNormal, but since my terrain origin is not in (0,0,0), I wonder if there is some better method to get this normals.

PS: when I say world position, the y-coordinate can be ignored, since there will be only one normal for the position (x, _, z).

If you’re not interesting in using physics then you’re best to ask on the Scripting forum and not the physics forum.

I can move your post there if you wish.

To add though, even if it’s not physics, the terrain origin is irrelevant.

You can convert the world position you want into the local-space position of the Terrain by using the standard Transform.InverseTransformPoint (with the Terrain GameObject Transform).

This local-space position can then be normalized using the [size of the Terrain](http://The terrain size: Unity - Scripting API: TerrainData.size) (devide it by this). Just a standard normalization.

I’m not a terrain expert though, I’ve never actually used it.