character stoping distance math
i'm trying to work out the math to give me the stopping distance and stopping time of a character. i know that if it wasn't for ground friction it would be: StopTime= Speed/braking Deceleration Stop Distance = (Speed/StopTime) / 2
but i'm finding it hard to wrap my head around how the ground friction works. it defaults to 8 and stooping times and distances don't seem to have a linear relation ship to movement speed. so i'm guess there is some exponential thing i'm not understanding. any help would be awesome, Thanks :)
asked Jul 27 '18 at 02:45 PM in C++ Programming
Here is a Tutorial to how to make a wheeled vehicle in Unreal.
In reality vehicle experience 2 types of meaningful friction (static and dynamic) and materials have different friction coefficients for those cases. Here is a Wikipedia article for more information on the physics side of things. Keep in mind that all those calculations already simulated in the Unreal physics engine.
from this point on you get
Keep in mind that the Friction Coefficient must be different when the car is sliding. (Above some maximum FrictionForce the coefficient changes) NormalForce is largely dependent on your car weight and the downforce.
If you need a full physical model of a car you will need to account for the downforce, suspension hardness, loss of friction, weight transfer between wheels, centrifugal force in turns, contact surface temperature and area (between the wheels and the road).
Some of these can and are frequently ignored in games. (temperature and weight transfer) Most of the ones that are needed (like loss of friction and down force) have simplified math models that are used in games but they are in no way simple to understand.
Happy coding :)
Follow this question
Once you sign in you will be able to subscribe for any updates here