C# Класс 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.
Наследование: RigidBody
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
world_PostStep ( float timeStep ) : void

Описание методов

AdjustWheelValues() публичный Метод

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
Результат void

DefaultCar() публичный Метод

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.
Результат System

RemoveCar() публичный Метод

public RemoveCar ( ) : void
Результат void

SetInput() публичный Метод

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 .
Результат void