Skip to content

duy-phamduc68/Planar-Dynamic-Car-Model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Planar Dynamic Car Model

Main reference: Macro Monster's Car Physics Guide

Check out the learning journey on my blog: yuk068.github.io

Model 1-5 (Longitudinal Simulators) are in this repository: duy-phamduc68/Longitudinal-Car-Physics

Model 6 (Planar Kinematic Car Model) is in this repository: duy-phamduc68/Planar-Kinematic-Car-Model

I try to break down each model both mathematically (continuous math) and implement them in code.

This repository contains code for Model 7 of the roadmap.

drift

Model 7: High-Speed Lateral Tire Model (2D)

simulator 7 thumbnail 1

simulator 7 thumbnail 2

Technical Breakdown

To be honest, I've tuned the default settings and reworked this model to get it to be more video-game-fun, all constants are customizable if you want to try to make it more realistic, but I've decided to not go deeper into realism for this model.

Input Guide

Click on the grid tiles to toggle their highlighted state.

Keyboard Controls

Key(s) Action
W / Up Throttle
Space / Down / S / LShift Brake
A / Left Steer left
D / Right Steer right
J Downshift
K Upshift
1 Toggle auto shift
2 Zoom in
3 Zoom out
4 Toggle true form
Q Timer cycle (idle → running → stopped → idle)
R Reset scenario
F Toggle fullscreen
Esc Open/close options

Xbox Controller (XInput)

Control Action
RT Throttle
LT Brake
Left Stick X Steering
X / LB Downshift
B / RB Upshift
A Toggle auto shift
D-pad Left Timer cycle (idle → running → stopped → idle)
D-pad Right Toggle true form
Back / Select Reset scenario
D-pad Up Zoom in
D-pad Down Zoom out
RS Toggle fullscreen
Start Open/close options

Completed models:

About

A 2D vehicle simulator using a RWD dynamic bicycle model.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages