Table of Contents

Class EntityCar

Namespace
VoxelPlayground.Entity
Assembly
GamePlay.dll
public class EntityCar : EntityAttachmentItem, IVehicle
Inheritance
object
EntityCar
Implements
Inherited Members
Extension Methods

Fields

accelerationFactor

public float accelerationFactor

Field Value

float

accelerationWheels

[FormerlySerializedAs("m_WheelsAccelerate")]
public EntityWheel[] accelerationWheels

Field Value

EntityWheel[]

aiCarController

[NonSerialized]
public AICarController aiCarController

Field Value

AICarController

cachedSuspensionHeight

[NonSerialized]
[ShowInInspector]
public float cachedSuspensionHeight

Field Value

float

centerOfMass

public Transform centerOfMass

Field Value

Transform

driverSeat

public Seat driverSeat

Field Value

Seat

isExploded

public bool isExploded

Field Value

bool

isHideWheels

[FormerlySerializedAs("IsHideWheels")]
public bool isHideWheels

Field Value

bool

seats

public Seat[] seats

Field Value

Seat[]

steeringDamping

public float steeringDamping

Field Value

float

steeringStrength

public float steeringStrength

Field Value

float

steeringWheels

[FormerlySerializedAs("m_WheelsSteering")]
public EntityWheel[] steeringWheels

Field Value

EntityWheel[]

wheelsCenter_LS

[NonSerialized]
public Vector3 wheelsCenter_LS

Field Value

Vector3

wheelsMaxAngularVelocity

public float wheelsMaxAngularVelocity

Field Value

float

Properties

AllWheels

public EntityWheel[] AllWheels { get; }

Property Value

EntityWheel[]

Steering

[ShowInInspector]
public float Steering { get; set; }

Property Value

float

Methods

ApplyAccelerate(float)

public void ApplyAccelerate(float acceleration)

Parameters

acceleration float

ApplyBrake(float)

public void ApplyBrake(float brakeForce)

Parameters

brakeForce float

ApplySteering(Vector3)

public void ApplySteering(Vector3 steering)

Parameters

steering Vector3

ApplyThrottle(float)

public void ApplyThrottle(float throttle)

Parameters

throttle float

Awake()

protected override void Awake()

ClearSeats()

[Button]
public void ClearSeats()

Destroy()

public void Destroy()

SetCarMovementUI(EntityCar, float, float)

public static void SetCarMovementUI(EntityCar car, float carAcc, float carSteering)

Parameters

car EntityCar
carAcc float
carSteering float

SetEngineEnable(bool)

public void SetEngineEnable(bool enable)

Parameters

enable bool

SetSteering(float, bool, bool)

[Button]
public void SetSteering(float steering, bool crabMode = false, bool rotateMode = false)

Parameters

steering float
crabMode bool
rotateMode bool

SetSuspensionHeight(float)

[Button]
public void SetSuspensionHeight(float height)

Parameters

height float

SetSuspensionTilt(Vector2, float, float)

public void SetSuspensionTilt(Vector2 tilt, float maxTilt, float baseHeight)

Parameters

tilt Vector2
maxTilt float
baseHeight float

Start()

protected override void Start()

Update()

public void Update()

Explicit Interface Implementations

IVehicle.centerOfMass

Transform IVehicle.centerOfMass { get; }

Returns

Transform

IVehicle.driverSeat

Seat IVehicle.driverSeat { get; }

Returns

Seat

IVehicle.isExploded

bool IVehicle.isExploded { get; }

Returns

bool