Vehicles sliding
-
FLAP_BRBGOING2MOON
- Posts: 166
- Joined: 2011-02-20 20:56
Vehicles sliding
can we do something about sliding down gentle inclines when stopped? its really bad in wheeled vehicles.
-
Arab
- PR:BF2 Developer
- Posts: 2898
- Joined: 2012-05-18 03:37
Re: Vehicles sliding
Thanks for the report!
Just to know which vehicles are doing it to compare the code, which vehicle currently does this?
[R-DEV]Alon discovered a while back that there's a component in the engine called Sleepiness which decides how much time to wait when a physics object is very slow until it "freezes" it in place.
The memory locations are known, but it's a matter of figuring out the value, and the method of patching them with a lower value for PCO's (Player Control Objects) and testing to make sure it has no side-effects.
Though initially, my suspicion is that it's either these two values being too low:
(Values found in some jeeps)
Might be the engineBrakeTorque being set too low which results in it sliding.
For example, civ_jep_technical (+ all color variants)
Testing this on Kashan with a Hmmwv and a Technical, the Technical slides further due to the engineBrakeTorque being too low, while the Hmmwv with a value of 2000 doesn't slide as much when on an incline.
Also there's a Handbrake solution posted way back that I'll have a look at if a fix to the brake physics isn't found:
Just to know which vehicles are doing it to compare the code, which vehicle currently does this?
[R-DEV]Alon discovered a while back that there's a component in the engine called Sleepiness which decides how much time to wait when a physics object is very slow until it "freezes" it in place.
The memory locations are known, but it's a matter of figuring out the value, and the method of patching them with a lower value for PCO's (Player Control Objects) and testing to make sure it has no side-effects.
Though initially, my suspicion is that it's either these two values being too low:
Code: Select all
ObjectTemplate.newCar2.brakeTorque 2500
ObjectTemplate.newCar2.engineBrakeTorque 2000
Might be the engineBrakeTorque being set too low which results in it sliding.
For example, civ_jep_technical (+ all color variants)
Code: Select all
ObjectTemplate.newCar2.brakeTorque 2000
ObjectTemplate.newCar2.engineBrakeTorque 750
Also there's a Handbrake solution posted way back that I'll have a look at if a fix to the brake physics isn't found:
Code: Select all
HandBrake Thread[/url]
Edit: Increasing engineBrakeTorque reduces the slide distance, but the handbrake code doesn't seem to do anything permanent.
Last edited by Arab on 2019-05-23 03:45, edited 10 times in total.
-
FLAP_BRBGOING2MOON
- Posts: 166
- Joined: 2011-02-20 20:56
Re: Vehicles sliding
its really the technicals that give me issues, especially since they have terrible gun depression you need to be angled down on a hill and you just slide all over the place.
-
Arab
- PR:BF2 Developer
- Posts: 2898
- Joined: 2012-05-18 03:37
Re: Vehicles sliding
Thx, added issue to project tracker to fix for v1.6FLAP_BRBGOING2MOON wrote:its really the technicals that give me issues, especially since they have terrible gun depression you need to be angled down on a hill and you just slide all over the place.
-
FLAP_BRBGOING2MOON
- Posts: 166
- Joined: 2011-02-20 20:56
Re: Vehicles sliding
thanks!
Edit: the VN-3 is pretty bad too.
Edit: the VN-3 is pretty bad too.
Last edited by FLAP_BRBGOING2MOON on 2019-05-25 17:27, edited 1 time in total.

