calc velocity on inclined plane with friction

Started by
11 comments, last by oliii 13 years, 11 months ago
Mass is incorperated in the acceleration. If you talk about the acceleration of an object, its mass is not important. If two vehicles decelerate at 2m/s^s, regardless of their mass they are decelerating at the same rate (which means one has a lot better brakes than the other).

So basically you're confusing multiple topics. I semi truck takes longer to slow down because it applies a certain slow down force, not decleration. The deceleration would than be calculated with: A = f/m

I never mentioned forces, my example stays strictly on the 'A' side of the equation.

Another thing you may be poking at is that the friction force is often computed based on the normal force. Again, these are forces and not mentioned in the above discussion.

You would inversely scale the deceleration rate by the mass of the object.
Advertisement
Alright so I've really been struggling with getting the friction working over the past couple days. The problem I'm having is that the acceleration is half the max speed, so it will take half a second to reach max speed. That all works in a frictionless world... but as soon as I apply friction the friction value almost cancels out the acceleration so it takes FOREVER to reach max speed from a stationary position. On the same note, if I turn down the friction value then the player accelerates fine, but then slides and doesn't stop. I am having the hardest time finding a good mid-ground. Or perhaps I need a different approach.

My Friction Function (actionscript 3):

public static function applyFriction(toPawn:Pawn, overTime:Number):void {	if (!toPawn._onPhysical){		return;	}	if (toPawn._speed._MPS._x == 0){		return;	}		var tSpeedModifierX:int = toPawn._speed._MPS._x / Math.abs(toPawn._speed._MPS._x);	var tFrictionCoefficient:Number = toPawn._friction * toPawn._physicalBelow._friction;	var tFriction:Number = -(15) * tFrictionCoefficient;	var tDeceleration:Vector2D = new Vector2D((tFriction * tSpeedModifierX), 0);	applyAcceleration(toPawn, overTime, tDeceleration);				if ((toPawn._speed._MPS._x / Math.abs(toPawn._speed._MPS._x)) != tSpeedModifierX){		toPawn._speed._MPS._x = 0; //Check to see if we have gone past 0	}	toPawn._speed.calcMPS();}
Friction will determine your terminal velocity, which maybe lower than your expected max speed. If you take a car for example, it will take it a very long tine to reach max speed, which depends on the aerodynamics and engine power.

Frction is not easy tbh. There are all sorts of bodges applied to deal with ground friction and character physics, and usually it's not pretty.

Everything is better with Metal.

This topic is closed to new replies.

Advertisement