top of page
Whiteboard.jpg

Physics Controllers

Experiments in CCC programming

About Physics Driven Controllers

Personal Project | Unity | Ongoing

A personal project undertaken to maintain my professional practice.
I wanted to develop something under direct player control as I'm often working on systems that respond to player actions.

🔗 GitHub 🔗

⚠️ This is an in-progress project and will be updated as new content is added.

Context

Since I'm normally focused on systems that are separate from player input, I thought this would be a good exercise to keep my professional practice up. Since physics oriented approaches to tires require the implementation of springs, it also made it a good candidate to test out a floating capsule approach to player locomotion.
 

Details on how the implementation has progressed are available below.​ At the moment, further technical development is on pause while I figure out what sort of game I want to flesh this out into by doing some design research. ​

Current Progress

  • A physics driven player controller, with common platformer affordances still pending.

  • A wheel driven vehicle system with core physical forces corresponding to 3 axis. [in progress]

  • Support for controllers and steering wheels. [in progress]

Floating Capsule Character Controller

The main advantages of the floating capsule approach to locomotion are ground clearance and full control over ground forces. Thanks to this I'm able to get smooth movement quite quickly while avoiding common issues with slopes and such. Combining this with common tricks like factoring acceleration speed when changing direction and some basic procedural animation using a torsional spring, this basic capsule already feels snappy and responsive.

This approach relies heavily on dampened spring forces, so it's good to have a working knowledge of oscillators.
My implementation calculates linear and torsional forces with Hooke's Law and standard rigidbody physics values.

 

PlayerMovement values.png

Wheel Driven Vehicle System

Wheel focused approaches to vehicles rely on applying the individual forces to each tire to create a live system with solid and responsive feedback factored in.

While a variety of forces can be applied, I followed the conventional approach with a focus on the three 3D axis:

  • X: Acceleration & Breaking (Longitudinal Movement)

  • Z: Steering & Slippage/Grip (Lateral Movement)

  • Y: Suspension (Vertical Movement)

car-wheel-bts.png

Logitech Steering Wheel Support

I've always had a soft spot for non-standard controllers and thought I'd try my hand at implementing support for an old steering wheel and pedals I had in storage.

Logitech offers an SDK for their controllers in Unity but they stopped supporting it some time ago. Thankfully the community identified the core issue is a missing DLL file which, once acquired, is a fairly straightforward fix.
The bulk of the actual implementation is standard unity busywork, it struggles to integrate with some of the newer input management systems but won't impact the experience for the player in any meaningful way.

While I don't think I'll be making this game one that functions fully with non-standard controllers, it has been an enjoyable experience.

I learned some new things, which was always the goal.

bottom of page