GetGroundZFor_3dCoord()

Hello how can I get the correct coord of Z with GetGroundZFor_3dCoord() I use it like this:
spawnZ = GetGroundZFor_3dCoord(spawnPosX, spawnPosY, 99999.0, 1)
But when I print spawnZ it show always ‘1’, my item spawn under the ground, can someone help me please ? Thank you

1 Like

What are you trying to do? Make an object spawn on the surface?

unusedBool, spawnZ = GetGroundZFor_3dCoord(spawnPosX, spawnPosY, 99999.0, 1)

2 Likes

Thank you Flatracer, now my random spawn object work correctly <3

2 Likes