Hi there!
Context:
I've been developing a plugin to add steering wheel support to a game, and force feedback is a natural part of it. The current implementation is a naive one based on the vehicles' velocity vector, and the force feedback makes the players' wheel turn the car wheels towards that direction, which emulates the self-aligning torque. Paired with some extra logic to add road surface detail and other effects, this works quite well and drives convincingly. I've not received negative feedback on this method.
Problem:
Recently, I've been attempting to extract more data from the game, to provide a more accurate force feedback model. The core in this is the slip angle, but I've been unable to find proper fields until very recently. I hope someone here could help me on the right track, with the limited data I've been able to get from the game.
From the vehicle instance, I can access four wheel/suspension objects, which have fields that describe the wheel. Two fields caught my interest:
- One vector that indicates the wheel's world velocity
- One vector that indicates where the wheel is applying force towards - with the amplitude being the velocity-at-tire of said wheel.
If I take the angle between these, I get the slip angle. While this might not be the ideal way to get it, I think it's accurate (enough) after checking with edits to the vehicles' optimum slip angle.
Now my force feedback value is composed of the following values:
- A value based on the ratio between the actual slip angle and optimum slip angle
- A value based on the lateral distance between these two vectors
With 1. implemented, the overall steering feel is great, but at very low speeds, the force ramps up in random directions as the angle calculation reaches implausible numbers.
With 2. added, the random spikes at low speeds disappear, but the feeling around zero slip angle is vague. Additionally, it's harder to feel when the car starts to lose traction (understeer) or transition into oversteer.
So in short, I have the direction of the force, but no real idea what the amplitude of the force should be. Can I distill more information from those two vectors I get from the game? How is this torque-at-the-steering-wheel built up in other games/simulators?
Thanks in advance ?