Exemplo n.º 1
0
    public void AddForces()
    {
        //Calculate velocity, add gravity
        Vector3 gravity = PhysicsCalculator.CalculateGravity(gravitationalForce);

        velocity  = PhysicsCalculator.ApplyAcceleration(velocity, direction, acceleration);
        velocity += gravity;

        //Add Air resistance
        velocity = PhysicsCalculator.AddAirResistance(velocity, airResistance);
    }