Jump to content

Ground


Baseplate

Recommended Posts

Posted
I think he already got the Z value from getGroundPosition, but he wants the difference between his Z level and the other one ( the distance ), So try using this function:
getDistanceBetweenPoints3D 

There's no need for that.

local distance = playerZ - groundZ 

  • Moderators
Posted

Correct, except it can also be negative.

local distance = playerZ - groundZ 
if distance < 0 then 
    distance= -distance 
end 

(0 if the point you tried to test is outside the loaded world map)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...