racer home

Car collisions

 

Home Defining the shape of the body for collision purposes.


Dolphinity Organiser - free planning, project management and organizing software for all your action lists
Introduction

A car needs to be able to collide. For this, you can define a simple box or a more accurate 3D collision model. Versions before v0.8.3 could only handle an ellipsoid shape for the car vs track collisions, but v0.8.3 (Newton) introduces more accurate bounding shapes.

A car consists of 3D graphics model to visualize the car, but it can have a simpler 3D collision model (simpler because of performance reasons).

Collision shape

You must define a collision box/shape for the car, which is used to detect collisions with other cars and the track (static & dynamic objects) itself.

You can choose between a 3D model and a simpler box; using the 3D model is highly recommended though. The parameters are:

Below an example collision is shown (it's the Lamborghini Murcielago, only simplified). Note that the shape will be turned into a convex hull, meaning the 'dents' in the sides of the chassis will be moved outward in the collision engine (picture yourself shrink-wrapping the model).

car collision model

Collision physics

Collision response is done these days using physics materials (softness parameter).

Debugging/verifying the collision shape

Testing the collision shape can be done as follows:

More reading material

More information on creating a full car can be found here.


Dolphinity Organiser - free planning, project management and organizing software for all your action lists

(last updated February 28, 2013 )