Open ArranTuna opened 6 years ago
The Monster problem should be fixed but I am not sure about vehicles that are upside down (yet on the ground) or vehicles driving on walls (with setVehicleGravity).
I invite suggestions and comments
Monster problem is still present in v1.5.9-release-21024.1. I encountered the same issue for Dune. It must be something related to their unusual suspension. Lowering suspensionForceLevel in handling fixes the problem (to 0.2 for Monster or 0.4 for Dune). That change is a bit too much for those vehicles, but maybe this will be of some help in figuring out the underlying problem
It must be something related to their unusual suspension. Lowering suspensionForceLevel in handling fixes the problem
seems very related to issue #2093 as well, and all stuff tied to it comes back to unusual suspension values. For the latter, also see my comment on that issue.
Not sure about unsual suspension values, but for typical situations using isVehicleWheelOnGround
is good enough and in most cases even more precise. Just keep in mind what you consider "vehicle on ground" for your use case, in other words, which combination of wheels on ground makes the vehicle on ground: all wheels, only driven wheels, or any single wheel. Works for Monster and Dune in all my use cases anyway
Describe the bug isVehicleOnGround returns false on some vehicles upside down and isVehicleOnGround always returns false for Monsters.
Vehicle IDs: 444, 556, 557
isVehicleOnGround(getPedOccupiedVehicle(localPlayer)) always return false
To Reproduce
crun isVehicleOnGround(getPedOccupiedVehicle(localPlayer))
Expected behavior Should return true
Screenshots
MTA Client (please complete the following information): unstated
MTA Server (please complete the following information): unstated
Additional context From mantis 7880 and mantis 8672