Page 1 of 1

Trouble Getting Terrain Height

Posted: Thu May 13, 2021 6:25 pm
by l3lessed
So, I have one last bug in the minimap mod really screwing me up.

When the indicators get the height, they pull the DFlocation and grab its height. However, I'm hitting a code sequence bug. Because it grabs the height before the full location block is created, it sets it to a incorrect height of 550 something. If I run the indicator setup again, after I am loaded in the the location, it works just fine and grabs the right height.

Does anyone know an easy way to check and wait to run code until the whole scene, location, and player is built and loaded? It would be preferable for my minimap to only load after that point.

Re: Trouble Getting Terrain Height

Posted: Thu May 20, 2021 6:29 pm
by Daniel87
l3lessed wrote: Thu May 13, 2021 6:25 pm So, I have one last bug in the minimap mod really screwing me up.

When the indicators get the height, they pull the DFlocation and grab its height. However, I'm hitting a code sequence bug. Because it grabs the height before the full location block is created, it sets it to a incorrect height of 550 something. If I run the indicator setup again, after I am loaded in the the location, it works just fine and grabs the right height.

Does anyone know an easy way to check and wait to run code until the whole scene, location, and player is built and loaded? It would be preferable for my minimap to only load after that point.
I am not sure, but maybe using Coroutines with yield return ?
Can't you just add +10 to the height to make sure it hovers over the real object?