• Stars
    star
    327
  • Rank 128,091 (Top 3 %)
  • Language
    C#
  • License
    MIT License
  • Created about 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Arcade Car Physics - Vehicle Simulation for Unity3D

About

My attempts to make a fun vehicle physics and arcade control. The primary goal was to make a vehicle controller which is easy to set up and fun to play with. I'm pretty happy with the results. This approach can be used for games like GTA, Rocket League or Flatout.

alt tag

Warning: This is not a final product! This is only my thoughts on the topic.

You can download precompiled demo from releases page: https://github.com/SergeyMakeev/ArcadeCarPhysics/releases/tag/1.0

Demo video available: https://www.youtube.com/watch?v=HCuJi2pntOw

Key things:

  • Speed Curve (instead of complicated engine settings)

  • Stable Suspension

  • Stablizier Bar Forces

  • Ackermann Steering

  • Downforce

  • Normalized Tire laterial friction

  • Handbrakes

  • In-flight vehicle stabilization

This demo is made using Unity game engine. It should be easy to implement this algorithm on any other game/physics engine.

Useful reading (in random order):

SuperTuxKart https://github.com/supertuxkart/stk-code https://supertuxkart.net

Bullet Physics Vehicle https://github.com/bulletphysics/bullet3/tree/79d24db60f2c916ffcdaf8b074be622e2e5bc609/src/BulletDynamics/Vehicle

Space Dust Racing UE4 Arcade Vehicle Physics Tour http://blog.spaceduststudios.com/space-dust-racing-unreal-engine-4-arcade-vehicle-physics-tour/ https://www.youtube.com/watch?v=LG1CtlFRmpU

Car Physics for Games http://www.asawicki.info/Mirror/Car%20Physics%20for%20Games/Car%20Physics%20for%20Games.html

Edy's Vehicle Physics: Anti-roll bars exposed http://www.edy.es/dev/2016/04/anti-roll-bars-exposed/

Edy's Vehicle Physics: Engine, clutch and gearbox in Vehicle Physics Pro http://www.edy.es/dev/2015/02/engine-clutch-and-gearbox-in-vehicle-physics-pro/

Edy's Vehicle Physics: Miscelaneous topics explained https://vehiclephysics.com/advanced/misc-topics-explained/

Edy's Vehicle Physics: Facts and myths on the Pacejka curves http://www.edy.es/dev/2011/12/facts-and-myths-on-the-pacejka-curves/

Edy's Vehicle Physics: The stabilizer bars: creating physically realistic, stable vehicles http://www.edy.es/dev/2011/10/the-stabilizer-bars-creating-physically-realistic-stable-vehicles/

Edy's Vehicle Physics: Pacejka 94 parameters explained - a comprehensive guide http://www.edy.es/dev/docs/pacejka-94-parameters-explained-a-comprehensive-guide/

PsRealVehicle is the plugin for Unreal Engine 4 with simple force-driven vehicle simulation. https://github.com/PushkinStudio/PsRealVehicle

The Physics of Racing http://phors.locost7.info/contents.htm

Randomation Vehicle Physics https://github.com/JustInvoke/Randomation-Vehicle-Physics

SimpleRaycastVehicle-Unity https://github.com/unity-car-tutorials/SimpleRaycastVehicle-Unity/

Car Controller blog post by Seena Burns http://seenaburns.com/2018/03/02/car-controller/

Supercharged! Vehicle Physics in 'Skylanders' https://www.gdcvault.com/play/1022942/Supercharged-Vehicle-Physics-in-Skylanders https://www.youtube.com/watch?v=Db1AgGavL8E

The Science of Off-Roading: 'Uncharted 4's' 4x4 https://www.gdcvault.com/play/1024620/The-Science-of-Off-Roading

Vehicle Feel Masterclass: Balancing Arcade Accessibility with Simulation Depth https://gdcvault.com/play/1025383/Vehicle-Feel-Masterclass-Balancing-Arcade

The Physics of Fun: The Vehicles of Saints Row https://www.youtube.com/watch?v=3XXw-2EPlL0

Implementing Racing Games: An intro to different approaches and their game design trade-offs https://superheroesinracecars.com/2016/08/11/implementing-racing-games-an-intro-to-different-approaches-and-their-game-design-trade-offs/

OpenC1 https://github.com/jeff-1amstudios/OpenC1/tree/master/OpenC1/Physics

How to write a driving simulator (Russian) https://gamedev.ru/code/articles/Racing_Simulator

NVidia PhysX: Vehicles User's Guide https://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/guide/Manual/Vehicles.html

A 2D Car Physics Model based on Ackermann Steering http://entertain.univie.ac.at/~hlavacs/publications/car_model06.pdf

Steering theory and geometry for automobile and mechanical engineers https://www.slideshare.net/upenderrawat1/steeringtheroy

It IS Rocket Science! The Physics of 'Rocket League' Detailed https://www.gdcvault.com/play/1025341/It-IS-Rocket-Science-The

Assets

HDR Envirnoment map from HDRI HAVEN https://hdrihaven.com

Terrain textures from Texture.com https://www.textures.com

Traffic cone from "Barrier & Traffic Cone Pack" by Sabri Ayes https://assetstore.unity.com/packages/3d/environments/barrier-traffic-cone-pack-82549

Vehicle from "Muscle car 1969 Vehicle Physics (dirty and clean)" by Konstantin Koval https://assetstore.unity.com/packages/3d/vehicles/land/muscle-car-1969-vehicle-physics-dirty-and-clean-118132

Barrel from "Crate and Barrels" by Kobra Game Studios https://assetstore.unity.com/packages/3d/props/industrial/crate-and-barrels-73101

More Repositories

1

TaskScheduler

Cross-platform, fiber-based, multi-threaded task scheduler designed for video games.
C++
549
star
2

slot_map

A slot map is a high-performance associative container with persistent unique 32/64 bit keys to access stored values.
C++
246
star
3

smmalloc

Blazing fast memory allocator designed for video games
C++
239
star
4

ecs

Thoughts about entity-component-system
C++
183
star
5

Zmeya

Zmeya is a header-only C++11 binary serialization library designed for games and performance-critical applications
C++
102
star
6

Goofy

Goofy - Realtime DXT1/ETC1 encoder
C++
70
star
7

Quaternions-Revisited

Sample code for a 'Quaternions revisited' article from GPU Pro 5
C++
31
star
8

Sandworm

Embeddable preprocessor based on clang. Created to compile ubershaders, but can preprocess anything you like.
C++
20
star
9

GpuZen2

Sample code for the article 'Real-Time Layered Materials Compositing Using Spatial Clustering Encoding'
C#
17
star
10

z8

Z8 : fantasy 8-bit system
JavaScript
11
star
11

Ninja-Ripper-Maya-Importer-

Ninja Ripper Importer for Autodesk Maya
Python
11
star
12

tony-mc-mapface-fuse

A cool-headed display transform - ported to DaVinci Resolve
10
star
13

FastFiberIdea

C++
9
star
14

StaticVector

C++
5
star
15

sm_hash_map

C++
5
star
16

AimExplorer

Aim Acceleration Explorer in FPS games
HTML
4
star
17

DxtSplitter

C++
3
star
18

RobloxAvatarExporter

Python
3
star
19

FixMultimonWindows

C++
3
star
20

CellularAutomata

GPU Cellular Automata fun
C++
3
star
21

ECalc

Expression Calculator (Similar to Far Manager plugin)
HTML
2
star
22

DominantColorsExtractor

Python
2
star
23

Sputnik

Python
2
star
24

GitCheatSheet

2
star
25

BuildConfigurationTool

C#
1
star
26

AT-Linker

C++
1
star
27

MOD_XMQ

Custom extension for XMPP protocol to provide message broker features.
Erlang
1
star
28

sergeymakeev.github.io

github pages
JavaScript
1
star
29

ExcaliburHash

C++
1
star
30

XMQ_Client

Example of XMQ client.
C++
1
star