All Projects → adrenak → Tork

adrenak / Tork

Licence: mit
Arcade vehicle physics for Unity

Projects that are alternatives of or similar to Tork

Randomation Vehicle Physics
Vehicle physics system for the Unity engine.
Stars: ✭ 487 (+90.23%)
Mutual labels:  unity, unity3d, physics
Unity Destruction
💥 An open-source script to destroy objects realistically in Unity3D.
Stars: ✭ 291 (+13.67%)
Mutual labels:  unity, unity3d, physics
Unity Script Collection
A maintained collection of useful & free unity scripts / library's / plugins and extensions
Stars: ✭ 3,640 (+1321.88%)
Mutual labels:  unity, unity3d, physics
Mathutilities
A collection of some of the neat math and physics tricks that I've collected over the last few years.
Stars: ✭ 2,815 (+999.61%)
Mutual labels:  unity, unity3d, physics
Hololenscamerastream
This Unity plugin makes the HoloLens video camera frames available to a Unity app in real time. This enables Unity devs to easily use the HoloLens camera for computer vision (or anything they want).
Stars: ✭ 233 (-8.98%)
Mutual labels:  unity, unity3d
Nodulus
Puzzle game with clever twists (Unity3d)
Stars: ✭ 232 (-9.37%)
Mutual labels:  unity, unity3d
Il2cppdumper
Unity il2cpp reverse engineer
Stars: ✭ 3,362 (+1213.28%)
Mutual labels:  unity, unity3d
Midianimationtrack
SMF (.mid) file importer for Unity Timeline
Stars: ✭ 243 (-5.08%)
Mutual labels:  unity, unity3d
Urmotion
Flexible motion engine for non time-based animation in Unity.
Stars: ✭ 220 (-14.06%)
Mutual labels:  unity, unity3d
Ezsoftbone
A simple kinetic simulator for Unity, you can use it to simulate hair/tail/breast/skirt and other soft objects
Stars: ✭ 241 (-5.86%)
Mutual labels:  unity, unity3d
Cosinegradient
Cosine gradient generator for Unity
Stars: ✭ 244 (-4.69%)
Mutual labels:  unity, unity3d
Apple Signin Unity
Unity plugin to support Sign In With Apple Id
Stars: ✭ 228 (-10.94%)
Mutual labels:  unity, unity3d
Catlib
CatLib for unity3d dependency injection framework
Stars: ✭ 228 (-10.94%)
Mutual labels:  unity, unity3d
Roboleague
A car soccer environment inspired by Rocket League for deep reinforcement learning experiments in an adversarial self-play setting.
Stars: ✭ 236 (-7.81%)
Mutual labels:  unity, unity3d
Unity Utilities
A collection of Unity3D scripts I've been sharing between projects - open source, fully commented and with examples.
Stars: ✭ 224 (-12.5%)
Mutual labels:  unity, unity3d
Unitysizeexplorer
Visualize how much space each asset in your Unity game takes and quickly optimize your game's file size
Stars: ✭ 242 (-5.47%)
Mutual labels:  unity, unity3d
Gameframework
This is literally a game framework, based on Unity game engine. It encapsulates commonly used game modules during development, and, to a large degree, standardises the process, enhances the development speed and ensures the product quality.
Stars: ✭ 3,318 (+1196.09%)
Mutual labels:  unity, unity3d
Cradle
Play Twine stories in Unity.
Stars: ✭ 242 (-5.47%)
Mutual labels:  unity, unity3d
Colyseus Unity3d
⚔ Colyseus Multiplayer SDK for Unity
Stars: ✭ 251 (-1.95%)
Mutual labels:  unity, unity3d
Unity3D-Cars
A project built for a Renaissance Coders tutorial to introduce vehicle physics.
Stars: ✭ 60 (-76.56%)
Mutual labels:  physics, vehicle

Tork

An arcade vehicle system for Unity

Intro

Tork is not meant to be a realistic vehicle physics solution. It is best deployed in games where driving realism, especially at high velocities, is secondary. For example, demolition derby style games or games where driving is a secondary gameplay element. You could probably get away using it in a parking game.

Tork has its own Wheel physics component simply called TorkWheel which provides a greatly simplified friction computation mechanism. There are only three tweakable parametes: forward grip, sideways grip and rolling friction.

It provides spring customization which is quite similar to the inbuilt WheelCollider in Unity.

TorkWheel also provides recommended values and guidelines for tweaking values.

Components

Vehicle is the central class. It stores instances of all the Core and AddOn components in the car and this provides a single point for accessing these components. Vehicle class doesn't have any features of it's own and only facilitates in access.

Core

TorkWheel

A simplified version of Unity's Wheel Collider. Much of the information of this is in the Intro section above.

Ackermann

Tork uses Ackermann steering to turn the wheels in a realistic manner.

Motor

Essentially the engine of the vehicle. Has a maxTorque field that determines the maximum torque it can deliver. It also distributes it among the wheels smartly using the Ackermann component of the vehicle. Currently it only supports All Wheel Drive with other modes coming soon.

Value is the normalized value of the engines output. So .5 would mean the engine is creating maxTorque/2 torque.

maxReverseInput is the highest negative value the engine will output. This is because engines usually reverse at and up to a lower speed.

Brakes

Very similar to Motor except that it applies braking torque on the wheels. Please see source to see the similarities.

Steering

A layer of added feature over Ackermann. It stores the maximum steer angle the Ackermann will be sent as well as the rate at which the steering happens.

Add Ons

AddOns are scripts that can be used to add or modify the vehicles behaviour. These derive from VehicleAddOn so that Vehicle can store them in a list and provide GetAddOn<T>() a method that allows any consumer to access the add on by type.

The add ons shipped with Tork are

CenterOfMassAssigner

Assigns the center of mass of the vehicle. It is to be attached on a GameObject that represents the center of mass. You'd pretty much always need this class. Use it to make sure your center of mass is lower else the vehicle will flip on sharp turns.

AntiRoll

Vehicles in real life also have anti roll bars that try to keep the vehicle grounded based on the difference in compression of the horizontally opposite wheels. So when you're taking a sharp right turn, the anti roll bars help ensure you don't flip the car anti-clockwise (to the left).

DownForceVsSpeed

Applies a down force on the car to simulate better aerodynamics. You'd normally want a linear curve

MidAirStabilization

A pretty arcadish feature that tries to ensure that the vehicle lands flat on the ground. When the vehicle is in the air it applies counter torque based on the orientation.

MidAirStabilization

Another arcasish feature that allows the vehicle to be steered in air.

MaxSteerAndleVsSpeed

Used to mimic real life driving by changing the max angle by which the wheels will rotate. Unless you're a bad driver, you won't steer the wheels all the way at high speeds and flip it. This class simulates that.

TorkWheelViewSync

Synchronises the wheel meshes with the rotation and position of their respective TorkWheel objects.

Ideas

Many, many addons can be made. Some ideas I have: A BrakeLights that makes the tail lamps illuminate. SteeringWheelSync that rotates the wheel along with the steering input.

Input

The way input is provided and handled by the code and add on scripts may change, especially because it's like that as more add ons accumulate, it'd be good to make it available for reading some a common place. For now IVehicleDriver interface is to be extended. KeyboardVehicleDriver is inbuilt in Tork.

Demo

A demo scene and script is provided inside Tork/Samples/

Forks

For a DOTS implementation of Tork v1, check out @PragneshRathod901's fork

Contact

@github
@www
@npm

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].