Exemple #1
0
        public void AddForce(Vector2 forceDirection, float deltaTime)
        {
            Vector2 acceleration = forceDirection * force / mass * deltaTime;

            Velocity = (1 / dragCoefficient) * (float)WMath.Exp(-dragCoefficient / mass * deltaTime) *
                       (dragCoefficient * Velocity + mass * acceleration) - (mass * acceleration / dragCoefficient);
        }