Describe the bug
Wearing a jetpack and flying with it in a certain height changes the nearClipDistance. You can simply prove it by freezing the player in the air while moving the camera close to an object, near clip distance changes as soon as the player is equipped with a Jetpack. The bug affects my new water shader.
To reproduce
Create an object without collision in map editor in a height of at least 10 meters - GTA changes near clip distance as soon as the camera Z position is 10m or higher (confirmed).
Move close to that object with Jetpack, freeze player with admin panel and try to cross the camera with the object. Now toggle Jetpack on/off and see how the near clip distance changes.
Expected behaviour
Flying with jetpack or aircraft should not affect near clip distance in the way it does. Setting it to any value above 2.99 will always result in a change as soon as the camera reaches 10m or higher. In order to prevent this bug from happening, a server owner always has to use near clip values of 2.99 or lower.
Additional context
It also happens when sitting in an aircraft at a certain height. It does not happen when flying in a car at a certain height. This proves that GTA definitely checks for certain things when changing near clip distance.
I updated the bug report with my newest investigations. GTA additionally modifies near clip distance when the value is set to 3 (default) or higher, lower values than 3 work as intended.
Describe the bug Wearing a jetpack and flying with it in a certain height changes the nearClipDistance. You can simply prove it by freezing the player in the air while moving the camera close to an object, near clip distance changes as soon as the player is equipped with a Jetpack. The bug affects my new water shader.
To reproduce Create an object without collision in map editor in a height of at least 10 meters - GTA changes near clip distance as soon as the camera Z position is 10m or higher (confirmed). Move close to that object with Jetpack, freeze player with admin panel and try to cross the camera with the object. Now toggle Jetpack on/off and see how the near clip distance changes.
Expected behaviour Flying with jetpack or aircraft should not affect near clip distance in the way it does. Setting it to any value above 2.99 will always result in a change as soon as the camera reaches 10m or higher. In order to prevent this bug from happening, a server owner always has to use near clip values of 2.99 or lower.
Video https://youtu.be/GfH0AfNn6BA
nearClip without jetpack
nearClip with jetpack
MTA Windows 1.5.7-release-20157
Additional context It also happens when sitting in an aircraft at a certain height. It does not happen when flying in a car at a certain height. This proves that GTA definitely checks for certain things when changing near clip distance.