Page MenuHomePhabricator

Tank Controls cause Extreme stuttering during turning (esp. on slopes)
New, WishlistPublic

Description

https://www.youtube.com/watch?v=YeyeKNDq5Lw&feature=youtu.be
In the video i pressed turn and forward/backward key at the same time

This stuttering also happens during turning on a flat plain (CSAT AA has it) during speeds below ~ 50kph.

What causes the stuttering is the rapid gearchanges. These in turn are caused by the erratic thrust changes. Those erratic thrust changes are a result of using a negative thrustvalue for either ThrustL or ThrustR and the engine switching "turn modes".
If you drive on flat ground, using negative value for either of these disables thrust of the vehicle-engine, and the side with negative thrust is breaking, while the other side just continues to roll freely ("unpowered turn"). As long as both are positive, the engine gives power ("powered turn") to at least one side (meaning, 1 for the outer track, and a value between >=0 and <1 to the inner track)

Erratic behaviour is caused when switching between those 2 states: "powered turn" and "unpowered turn", and the 3rd state: "turn-on-spot", when one side moves in the opposite direction of the other. In the 3rd state, full engine thrust is enforced no matter what thrust value the controller uses.
Erratic behaviour can also happen on flat ground with some uneaven objects (e.g. rubble) underneath, and if the vehicle is at close to 0 speed (erratic switching between "turn-on-spot" and the other 2 modes depending on input).

For keyboard driving this is especially bad, as you can't do a powered turn at all. This also leads to annoying sound when using course corrections to follow a road for example, as thrust is cut off and goes to 100% in short order. The erratic switching also causes annoying sounds of course. Also, when driving the vehicle and you encounter this it may feel like extreme lag, while in truth its only the vehicle doing the stuttering.

It seems as if in the "turn-on-spot" state is the only case where tracks are allowed to spin in opposite directions (meaning -1 thrust means rotating with full force backwards). For the other 2 modes ThrustL=-1 means the left side is breaking, until stopped.

Bottom line is, that engine thrust should not be cut of if the controller thrust is > 0

The controll scheme should be changed to prevent this issue.


Here is a way how it could possibly be done:

*IF you give thrust on the controller, Engine Power does never cut off. This way you always have power to end a turn, no matter how much you turn.
*IF you give no thrust (or negative thrust on controller to the current direction of travel) on the controller, ThrustL and ThrustR can never be greater then 0. Thus you break with at least one side if turning. Without thrust you have 1 free rolling side and one side with some amount of brake power applied.

Negative thrust (in other words: we are breaking) and turning in, should be done the same principle way: 1 free rolling track, one track with steering brake. Ontop of those you add the negative thrust for breaking.
The rule that both sides have to keep the same rotation direction has to apply.

*IF vehicle velocity is 0 AND no thrust is given on the controller, the previous condition is to be overwritten: Both tracks should be able to turn in opposite directions. ThrustL and ThrustR can range from +1 to -1 (and ThrustL=-ThrustR) to allow turning on the spot.
HOWEVER, no engine thrust should be enforced by the game like it is now.

The result would be:
If you want to perform a turn on the spot, stop the vehicle to 0 km/h. turn in with your controller. This enables the tracks to turn opposite directions. Now give thrust on the controller to perform the turn. You controll the speed of the turn by the main throttle.

If you want to perform a regular turn when starting, give thrust first. Then turn in.

It may be usefull to manually enable the "turn-on-spot" condition. For this the handbrake key could be utilized as an override to standard behaviour.

This would put controll over vehicle turning and power during the turn back into the users hands and should prevent the majority of erratic behaviour.

Details

Legacy ID
2246509393
Severity
None
Resolution
Open
Reproducibility
Always
Category
Controls
Steps To Reproduce

Place tank on hill with orientation perpendicular to the hill-slope.
Make a 180° turn so it faces the otherway and try to not roll down by (using max forward thrust if facing uphill or backward thrust if facing down)

Event Timeline

Fennek edited Steps To Reproduce. (Show Details)Aug 2 2014, 6:51 PM
Fennek edited Additional Information. (Show Details)
Fennek set Category to Controls.
Fennek set Reproducibility to Always.
Fennek set Severity to None.
Fennek set Resolution to Open.
Fennek set Legacy ID to 2246509393.May 7 2016, 7:08 PM