Advertisement

[2D Top-Down Car Game] Braking

Started by April 03, 2014 09:42 PM
-1 comments, last by ookki 10 years, 10 months ago

Hello everyone!

I'm really new in "coding" (I'm actually using GameMaker so I don't know if it can even be considered that) so I think I'm still lacking in the right mindset. I started making a car game just for the pure fun of playing with some really simple physics, until I got in touch with (the seemingly infamous) guide of Marco Monster (http://www.asawicki.info/Mirror/Car%20Physics%20for%20Games/Car%20Physics%20for%20Games.html).

That's when the things started to get difficult and extremely fun! I enjoy trying to figure these things out.

For the last week I've been wrestling with slipratio but I finally somehow nailed it with RK4 (which I hadn't even heard about two weeks ago).

But now I stumbled upon a new obstacle which I just can't seem to get a grip of. Braking.

I know that I basically should put a friction force on the wheel which should then be turned into a torque(?) that resists the angular velocity of the wheel slowing it down. After that, my slipratio calculations should make the car slowdown and finally stop. This is the part which I don't get, how do I make tire stop a zero angular velocity? It must be somehow related with angular velocity and traction torque, right? I just can't get a hold of it.

Thanks in advance!

Ps. I read somewhere that the simplest way to simulate engine breaking is k*rps. Has anybody ran into a "realistic" coefficient?

This topic is closed to new replies.

Advertisement