# Measuring lateral force?

So I’m making a simple arcade motorcycle game and I have the basic gameplay functioning.
The next step is to take the vehicle handling from “working” to “engaging”. The bike needs to tilt while turning and slide wide if players take turns at high speeds.
To achieve both of these things, I want to measure the lateral force, but I really don’t have the slightest clue of how to do something like that.

You would need to calculate centripedal force and decide based on its magnitude what will happen to the motorcycle.

The calculation is not really complex and i found a nice little web page here: Centripetal and Centrifugal Acceleration Force
that has an example. I tried to put it into a function:

``````    /// <summary>
/// Calculates the centripedal force.
/// </summary>
/// <returns>The centripedal force.</returns>
/// <param name="speed">Speed in kilometers per hour</param>
/// <param name="weight">Weight in kilogram</param>

public float CalculateCentripedalForce ( float speed, float weight, float radius ) {

//convert kmh to meter per second
float speedInMeter = speed * 1000.0f * (1.0f/3600.0f);

//centripedal acceleration in meter per second squared
float cA = (speedInMeter * speedInMeter) / radius;

//centripedal force in newton
float cF = weight * cA;

return cF;

}
``````