ETQWPie - steering
- Description: Improve wheeled vehicle steering and fix related bugs
- Patch: steering-3.patch
-
Requires patches:
(none)
If you modify any movement related code, I strongly suggest that you test regularly with a dedicated server. Many things that look fine on a listen server break horribly with a LAN ping. You can also use net_forcelatancy (on both the client and server) to simulate a higher ping. The units do not appear to be ms, 30 on both results in a 100-160 ping.
This is a work in progress. The cvars (described below) are for debugging/comparison purposes. I would remove them and the old steering methods before any official release. I would also give PredictionErrorDecay_Angles some tender loving ;)
If you don't set com_useBinaryDecls 2 the new steering method will use defaults, which differ from what I have put in the defs for most vehicles.
To use a dedicated server, you seem to need to start the client with the same options. Selecting from the mods list or just trying to connect results in various errors.
- 3 user selectable steering modes. Use ui_wheeledSteerMethod to select
- 0 = new method. This introduces adds 3 stages of speed sensitive steering (the first two ramp smoothly, anything beyond the end of the second ramp is the old steering speed value), controled by the def values listed below. In the first stage, steering is simple linear speed for both turning and centering (doesn't use desiredDirection)
- 1 = old method, including almost all bugs.
- 2 = old method with bugs fixed. Steering below 15kph uses the same method as the slowest stage used for the new method.
Since this is a userinfo cvar, clients can each pick their own.
- steering related bug fixes:
- Reverse and handbrake causing the wheels to lose their their direction.
- Wheels could fail to center in some cirucmstances when you came to a stop.
- State of the sdWheeledVehicleControl object would get reset to an old state while inactive. This is not affected by any of the cvars.
- non-steering related fixes
- resting bug mentioned above is fixed.
- predictionerrordecay bug mentioned here is hacked around. Be warned this isn't really the right way to do it, and may contain new bugs. It seems to work for me, but per the original comments, the whole system could use some work. You can switch back to (almost) the old method using net_useOldAnglesPED 1
The new sdWheeledVehicleControl members and associated are def values
- steerSpeedLow / "steering_speed_med_speed"
steering speed used at low speed
- steerSpeedMed / "steering_speed_low_speed"
steering speed used at medium speed
- steerSpeedLowRange / "steering_speed_low_range"
At vehicle speeds from zero to steerSpeedLowRange, the steering speed is a ramp between the two values above
- steerSpeedMedRange / "steering_speed_med_range"
At vehicle speeds from steerSpeedLowRange to steerSpeedLowRange + steerSpeedMediumRange, the steering speed is a ramp between steerSpeedMed and forwardSteerSpeed
- maxSteerCenterFraction / "simplesteer_centering_max_fraction"
The maximum faction of current steering speed we allow to be lost by drift. This probably doesn't need to be a def value, and is currently 0.5 for all.
original thread
History
- Version 3 - first etqw pie version (002)
back to index