|
|
|
|
|
by lpeancovschi
334 days ago
|
|
A while ago I made a game for iOS that simulates vehicles and drifting. It was built in SpriteKit but very easy to do in any 2d game engine. The idea is: you put two wheels in front, connect them to the rectangle car shape with pin joints and then you apply force to the wheels. The angle of the force is very easy to calculate:
x = force * cos(bodyRotation + wheelRotation)
y = force * sin(bodyRotation + wheelRotation) That's it! I also added skid particles. The drifting was achieved by playing around with the wheels and body damping. The game is here: https://apps.apple.com/app/drift-mania-infinite-car-racer/id... |
|
- I enjoyed the immediate start - skid particles are practical - game looks good - it’s too difficult for me; I’d like a “zen” mode that doesn’t reset when I hit a wall.