Highroad Engine v1.3
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
MoreMountains.HighroadEngine.SolidWheelBehaviour Class Reference

This class handles physics behaviour (suspension mostly) and wheel display based on current vehicle dynamics More...

Inheritance diagram for MoreMountains.HighroadEngine.SolidWheelBehaviour:

Public Types

enum  RollingOrientationEnum { Normal , Inverse }
 Rotation direction of the wheel. More...
 

Public Member Functions

virtual void OnDrawGizmos ()
 Gizmos draws More...
 

Public Attributes

SolidController VehicleController
 Reference to Solid Controller parent. More...
 
Transform WheelPosition
 Reference to Wheel Position gameObject. More...
 
Transform WheelModel
 Reference to Wheel Model gameobject. More...
 
bool SteeringWheel
 
RollingOrientationEnum RollingOrientation
 
int WheelRotationSpeed = 600
 Multiplier factor for the wheel's rotation. Depends also on the vehicle's speed. More...
 
float MaximumWheelSteeringAngle = 30
 Maximum rotation angle for the wheel's direction tree, based on the car's wheel's direction. More...
 

Protected Member Functions

virtual void Start ()
 Instance initialization. More...
 
virtual void FixedUpdate ()
 Updates the spring's physics for the vehicle's dynamic behaviour More...
 
virtual void Update ()
 Updates the car position / independent from physics More...
 
virtual void SpringPhysics ()
 Applies the spring physics. More...
 
virtual void EnginePhysics ()
 Applies acceleration force More...
 
virtual void UpdateWheelHeight ()
 Updates the height of the wheel. More...
 
virtual void UpdateWheelAngle ()
 Updates the wheel angle. More...
 

Protected Attributes

RaycastHit _physicsHit
 
Vector3 _wheelTargetPosition
 
Rigidbody _rigidbody
 
RaycastHit _updateHit
 
float _previousLength
 
float _currentLength
 
float _springVelocity
 
float _wheelDistance
 
LayerMask _noLayerMask = ~0
 

Properties

bool IsGrounded [getprotected set]
 If this is true, the wheel touches the ground. More...
 
RaycastHit PhysicsHit [get]
 Contact point between the road and the wheel at physic's Update. More...
 

Detailed Description

This class handles physics behaviour (suspension mostly) and wheel display based on current vehicle dynamics

Member Enumeration Documentation

◆ RollingOrientationEnum

Rotation direction of the wheel.

Enumerator
Normal 
Inverse 

Member Function Documentation

◆ EnginePhysics()

virtual void MoreMountains.HighroadEngine.SolidWheelBehaviour.EnginePhysics ( )
protectedvirtual

Applies acceleration force

◆ FixedUpdate()

virtual void MoreMountains.HighroadEngine.SolidWheelBehaviour.FixedUpdate ( )
protectedvirtual

Updates the spring's physics for the vehicle's dynamic behaviour

◆ OnDrawGizmos()

virtual void MoreMountains.HighroadEngine.SolidWheelBehaviour.OnDrawGizmos ( )
virtual

Gizmos draws

◆ SpringPhysics()

virtual void MoreMountains.HighroadEngine.SolidWheelBehaviour.SpringPhysics ( )
protectedvirtual

Applies the spring physics.

◆ Start()

virtual void MoreMountains.HighroadEngine.SolidWheelBehaviour.Start ( )
protectedvirtual

Instance initialization.

◆ Update()

virtual void MoreMountains.HighroadEngine.SolidWheelBehaviour.Update ( )
protectedvirtual

Updates the car position / independent from physics

◆ UpdateWheelAngle()

virtual void MoreMountains.HighroadEngine.SolidWheelBehaviour.UpdateWheelAngle ( )
protectedvirtual

Updates the wheel angle.

◆ UpdateWheelHeight()

virtual void MoreMountains.HighroadEngine.SolidWheelBehaviour.UpdateWheelHeight ( )
protectedvirtual

Updates the height of the wheel.

Member Data Documentation

◆ _currentLength

float MoreMountains.HighroadEngine.SolidWheelBehaviour._currentLength
protected

◆ _noLayerMask

LayerMask MoreMountains.HighroadEngine.SolidWheelBehaviour._noLayerMask = ~0
protected

◆ _physicsHit

RaycastHit MoreMountains.HighroadEngine.SolidWheelBehaviour._physicsHit
protected

◆ _previousLength

float MoreMountains.HighroadEngine.SolidWheelBehaviour._previousLength
protected

◆ _rigidbody

Rigidbody MoreMountains.HighroadEngine.SolidWheelBehaviour._rigidbody
protected

◆ _springVelocity

float MoreMountains.HighroadEngine.SolidWheelBehaviour._springVelocity
protected

◆ _updateHit

RaycastHit MoreMountains.HighroadEngine.SolidWheelBehaviour._updateHit
protected

◆ _wheelDistance

float MoreMountains.HighroadEngine.SolidWheelBehaviour._wheelDistance
protected

◆ _wheelTargetPosition

Vector3 MoreMountains.HighroadEngine.SolidWheelBehaviour._wheelTargetPosition
protected

◆ MaximumWheelSteeringAngle

float MoreMountains.HighroadEngine.SolidWheelBehaviour.MaximumWheelSteeringAngle = 30

Maximum rotation angle for the wheel's direction tree, based on the car's wheel's direction.

◆ RollingOrientation

RollingOrientationEnum MoreMountains.HighroadEngine.SolidWheelBehaviour.RollingOrientation

◆ SteeringWheel

bool MoreMountains.HighroadEngine.SolidWheelBehaviour.SteeringWheel

◆ VehicleController

SolidController MoreMountains.HighroadEngine.SolidWheelBehaviour.VehicleController

Reference to Solid Controller parent.

◆ WheelModel

Transform MoreMountains.HighroadEngine.SolidWheelBehaviour.WheelModel

Reference to Wheel Model gameobject.

◆ WheelPosition

Transform MoreMountains.HighroadEngine.SolidWheelBehaviour.WheelPosition

Reference to Wheel Position gameObject.

◆ WheelRotationSpeed

int MoreMountains.HighroadEngine.SolidWheelBehaviour.WheelRotationSpeed = 600

Multiplier factor for the wheel's rotation. Depends also on the vehicle's speed.

Property Documentation

◆ IsGrounded

bool MoreMountains.HighroadEngine.SolidWheelBehaviour.IsGrounded
getprotected set

If this is true, the wheel touches the ground.

◆ PhysicsHit

RaycastHit MoreMountains.HighroadEngine.SolidWheelBehaviour.PhysicsHit
get

Contact point between the road and the wheel at physic's Update.


The documentation for this class was generated from the following file: