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
Afficher le fichier Open project: tpb3d/TPB3D

Méthodes publiques

Méthode 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

Méthode Description
world_PostStep ( float timeStep ) : void

Method Details

AdjustWheelValues() public méthode

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
Résultat void

DefaultCar() public méthode

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.
Résultat System

RemoveCar() public méthode

public RemoveCar ( ) : void
Résultat void

SetInput() public méthode

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 .
Résultat void