Hello, I’m making an endlesss driving minigame, and I’ve run into an oversight where the player’s car can steer to such an angle that collisions with the side knock them off course, and since the game is supposed to be a linear drive forward without reversing, this is a problem that will need to be addressed. I think if I limit how far the steering buttons can turn the car, then I can make sure this won’t happen, but I’m not sure where to start. The project was created from a standard Vehicle temple in UE5.8.4, with the sports car as the player’s vehicle. I appreciate any feedback regarding how to solve this issue.
A simple way is to limit the steering input based on the vehicle’s relative yaw to the road direction before passing it into Set Steering Input, while still allowing steering in the opposite direction.
Depending on the track layout, you could add further safeguards to keep the vehicle within an acceptable forward angle range. If the vehicle exceeds this range due to a collision, you can gradually correct its orientation while temporarily restricting steering input further. Something similar to Mario Kart in sprit.
Also correction of angles in physics simulation is not very desirable but would work with tiny touches, a better approach would be to have torque Z adjustments.