C# Class JitterDemo.DefaultCar

Creates the Jitter default car with 4 wheels. To create a custom car use the Wheel class and add it to a body.
Inheritance: RigidBody
Exibir arquivo Open project: tpb3d/TPB3D

Public Methods

Method Description
AdjustWheelValues ( ) : void

This recalculates the inertia, damping and spring of all wheels based on the car mass, the wheel radius and the gravity. Should be called after manipulating wheel data.

DefaultCar ( World world, Shape shape ) : System

Initializes a new instance of the DefaultCar class.

RemoveCar ( ) : void
SetInput ( float accelerate, float steer ) : void

Set input values for the car.

Private Methods

Method Description
world_PostStep ( float timeStep ) : void

Method Details

AdjustWheelValues() public method

This recalculates the inertia, damping and spring of all wheels based on the car mass, the wheel radius and the gravity. Should be called after manipulating wheel data.
public AdjustWheelValues ( ) : void
return void

DefaultCar() public method

Initializes a new instance of the DefaultCar class.
public DefaultCar ( World world, Shape shape ) : System
world Jitter.World The world the car should be in.
shape Jitter.Collision.Shapes.Shape The shape of the car. Recommend is a box shape.
return System

RemoveCar() public method

public RemoveCar ( ) : void
return void

SetInput() public method

Set input values for the car.
public SetInput ( float accelerate, float steer ) : void
accelerate float A value between -1 and 1 (other values get clamped). Adjust /// the maximum speed of the car by setting . The maximum acceleration is adjusted /// by setting .
steer float A value between -1 and 1 (other values get clamped). Adjust /// the maximum steer angle by setting . The speed of steering /// change is adjusted by .
return void