Jump to content

isPedOnGround is not stable


Negriukas

Recommended Posts

Posted

Hello, I'm making my vehicle shop system which it spawn the vehicle near the player exactly like freeroam, Sometimes it works fine and sometimes not because i recently added a isPedOnGround check and it seems that it's not stable.

Results:

false

2yospiw.png

true

14jut1l.png

Posted

Well isn't freeroam spawning the vehicles a bit up in the air so they'll fall down a bit and then balance up? I agree that it'll look more nice if you use isPedOnGround but the problem itself can't be that hard to workaround.

Posted

As a workaround, you can use either of these functions:

isLineOfSightClear 
getGroundPosition 

Ped's center is 1 unit above the ground.

Posted
As a workaround, you can use either of these functions:
isLineOfSightClear 
getGroundPosition 

Ped's center is 1 unit above the ground.

Thank you! I'll try to figure out how to make it.

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...