2using System.Collections.Generic;
4using System.Runtime.CompilerServices;
14 public float width {
get;
set; }
36 public int numWheels { [MethodImpl(MethodImplOptions.InternalCall)]
get; }
41 public float speedKMH { [MethodImpl(MethodImplOptions.InternalCall)]
get; }
50 INTERNAL_setSteering(angle, wheelIndex);
60 return INTERNAL_getSteering(wheelIndex);
68 public void SetBreak(
float value,
int wheelIndex)
70 INTERNAL_setBreak(value, wheelIndex);
80 INTERNAL_applyEngineForce(value, wheelIndex);
85 [MethodImpl(MethodImplOptions.InternalCall)]
86 private extern void INTERNAL_setSteering(
float angle,
int wheel);
88 [MethodImpl(MethodImplOptions.InternalCall)]
89 private extern float INTERNAL_getSteering(
int wheel);
91 [MethodImpl(MethodImplOptions.InternalCall)]
92 private extern void INTERNAL_setBreak(
float value,
int wheel);
94 [MethodImpl(MethodImplOptions.InternalCall)]
95 private extern void INTERNAL_applyEngineForce(
float value,
int wheel);
float GetSteering(int wheelIndex)
Get the wheel steering angle in degrees
int numWheels
Gets the number of wheels attached to this vehicle
void SetBreak(float value, int wheelIndex)
Set wheel's braking ratio
void SetSteering(float angle, int wheelIndex)
Set the wheel steering angle in degrees
float speedKMH
Gets the current vehicle speed in kilometers per hour
void ApplyEngineForce(float value, int wheelIndex)
Apply engine force to the wheel
GameObject connectedObject
float suspensionRestLength
float suspensionStiffness
float suspensionCompression