Home | Shake, rattle & roll. |
|
Introduction
Racer supports separate (moving) helmets & pilot bodies since v0.7.4. These shake as the car accelerates. The amount of shaking is currently hardcoded (v0.7.4). An example is shown below.
Modeling
There are some rules when modeling helmets in your 3D editor. The pivot point of the helmet should be located at the origin (see the image below). Also model your pilot body along with the helmet, so it doesn't have to be offset with respect to the helmet. Export separate objects for the helmet and pilotbody (for example: helmet.dof and pilotbody.dof).
Putting the model to use in Racer
You have to edit the car's car.ini file a bit to get the models recognized.
Field | Description |
pilot.helmet.model | A model description for the helmet. |
pilot.helmet.pos | An offset to place the helmet. This value is also used to offset the pilot body. |
pilot.body.model | The pilot body model. Currently this means the entire body (legs/chest/arms) without the head. If you need to move the pilot model with respect to the car, use the model's transformation possibilities, for example: pilot.body.model.offset.y=0.5 to move the 3D model up half a meter. |
An example extract from a car.ini file that places the helmet with a vertical offset of 2 cm:
pilot { helmet { model { file=helmet.dof } pos=0 0.02 0 } body { model { file=pilotbody.dof } } }
(last updated November 13, 2012 )