Using MoveTo() on Terrain

So I just recently switched to using terrain and I wanted to spawn ferns with random positions across the terrain.

Except when I use :MoveTo() onto the model I want to randomly place, it positions it inside the terrain(if there is terrain there) instead of moving it along the y-axis on top the terrain.

Not really sure if this is a bug, but should I go about placing ferns in a different way in my game?

If MoveTo doesn’t take smooth terrain into account then that’s a bug – nice find :slight_smile: Until they fix it, you can just start from 999 studs up from the lowest point you want ferns and raycast downwards to find where the ground(Y) is for that X/Z location, unless raycasting doesn’t take terrain into account either.

1 Like

Raycasting should definitely work.

Would you mind uploading a repro case? (e.g. your level, or just a script that places models).

Alright and Thanks.

Can confirm this is still a bug in 2019.

5 Likes