Class PhysicWheel3D
This component represents a Physic Vehicle Wheel.
Inheritance
Implements
Inherited Members
Namespace: Evergine.Framework.Physics3D
Assembly: Evergine.Framework.dll
Syntax
public class PhysicWheel3D : Component, IDependencyObject
Fields
Brake
The brake applied to the wheel.
Declaration
public float Brake
Field Value
Type | Description |
---|---|
float |
ChassisConnectionPointCS
The connection point to the chasis in the Chasis Space.
Declaration
public Vector3 ChassisConnectionPointCS
Field Value
Type | Description |
---|---|
Vector3 |
DeltaRotation
The rotation increment of the wheel since last frame.
Declaration
public float DeltaRotation
Field Value
Type | Description |
---|---|
float |
EngineForce
The engine force applied to the wheel.
Declaration
public float EngineForce
Field Value
Type | Description |
---|---|
float |
ForwardImpulse
The forward impulse.
Declaration
public float ForwardImpulse
Field Value
Type | Description |
---|---|
float |
FrictionSlip
Gets or sets the friction slip.
Declaration
[RenderProperty(AttachToTag = 2, AttachToValue = true)]
public float FrictionSlip
Field Value
Type | Description |
---|---|
float |
IsBrakableWheel
The brake force is applied in this wheel.
Declaration
[RenderProperty(Tooltip = "This wheel is affected by brake forces.")]
public bool IsBrakableWheel
Field Value
Type | Description |
---|---|
bool |
IsDriveWheel
The wheel is driven by engine forces.
Declaration
[RenderProperty(Tooltip = "The wheel is driven by engine forces.")]
public bool IsDriveWheel
Field Value
Type | Description |
---|---|
bool |
IsFrontWheel
Indicate if it is a front wheel.
Declaration
[RenderProperty(Tooltip = "Indicate if this wheel is located in the front side of the car.")]
public bool IsFrontWheel
Field Value
Type | Description |
---|---|
bool |
Remarks
A steerable front wheel turn in the desired orientation. A back wheel turn in opossite direction.
IsSteerableWheel
The wheel is steerable.
Declaration
[RenderProperty(Tooltip = "Indicate if this wheel will be affeced by steering value.")]
public bool IsSteerableWheel
Field Value
Type | Description |
---|---|
bool |
MaxSuspensionForce
Gets or sets the maximum suspension force.
Declaration
[RenderProperty(AttachToTag = 2, AttachToValue = true)]
public float MaxSuspensionForce
Field Value
Type | Description |
---|---|
float |
MaxSuspensionTravel
Gets or sets the Maximum suspension travel in meters.
Declaration
[RenderProperty(AttachToTag = 2, AttachToValue = true)]
public float MaxSuspensionTravel
Field Value
Type | Description |
---|---|
float |
MeshRenderer
The mesh renderer.
Declaration
[BindComponent(true, false, BindComponentSource.Owner, null, true)]
public MeshRenderer MeshRenderer
Field Value
Type | Description |
---|---|
MeshRenderer |
OverrideVehicleSettings
Indicates if this wheel will override the vehicle suspension parameters.
Declaration
[RenderProperty(Tag = 2)]
public bool OverrideVehicleSettings
Field Value
Type | Description |
---|---|
bool |
RaycastInfo
The raycast information of the wheel.
Declaration
public PhysicWheel3D.WheelRaycastInfo RaycastInfo
Field Value
Type | Description |
---|---|
PhysicWheel3D.WheelRaycastInfo |
Rotation
The rotation angle of the wheel.
Declaration
public float Rotation
Field Value
Type | Description |
---|---|
float |
SideImpulse
The side impulse.
Declaration
public float SideImpulse
Field Value
Type | Description |
---|---|
float |
Steering
The steering angle of the wheel.
Declaration
public float Steering
Field Value
Type | Description |
---|---|
float |
SuspensionCompression
Gets or sets the suspension compression.
Declaration
[RenderProperty(AttachToTag = 2, AttachToValue = true)]
public float SuspensionCompression
Field Value
Type | Description |
---|---|
float |
SuspensionDamping
Gets or sets the suspension damping.
Declaration
[RenderProperty(AttachToTag = 2, AttachToValue = true)]
public float SuspensionDamping
Field Value
Type | Description |
---|---|
float |
SuspensionRelativeVelocity
Suspension relative velocity.
Declaration
public float SuspensionRelativeVelocity
Field Value
Type | Description |
---|---|
float |
SuspensionStiffness
Gets or sets the suspension stiffness.
Declaration
[RenderProperty(AttachToTag = 2, AttachToValue = true)]
public float SuspensionStiffness
Field Value
Type | Description |
---|---|
float |
Transform3D
The wheel transform component.
Declaration
[BindComponent(true, true, BindComponentSource.Owner, null, true)]
public Transform3D Transform3D
Field Value
Type | Description |
---|---|
Transform3D |
WheelAxleCS
Wheel axle in Chasis Space.
Declaration
public Vector3 WheelAxleCS
Field Value
Type | Description |
---|---|
Vector3 |
WheelDirectionCS
Wheel direction in Chasis Space.
Declaration
public Vector3 WheelDirectionCS
Field Value
Type | Description |
---|---|
Vector3 |
WheelTransform
The wheel transform.
Declaration
public Matrix4x4 WheelTransform
Field Value
Type | Description |
---|---|
Matrix4x4 |
WheelsSuspensionForce
/The wheel suspension force.
Declaration
public float WheelsSuspensionForce
Field Value
Type | Description |
---|---|
float |
Properties
PhysicVehicleEntityPath
Gets or sets the entity path of an entity that contains the passthrough layer.
Declaration
[RenderProperty(AttachToTag = 1, AttachToValue = PhysicVehicleSearchType.FromEntityPath)]
public string PhysicVehicleEntityPath { get; set; }
Property Value
Type | Description |
---|---|
string |
RotationAxis
Gets or sets the wheel rotation axis.
Declaration
public Vector3 RotationAxis { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
SearchVehicle
Gets or sets how to search the passthrough layer.
Declaration
[RenderProperty(Tag = 1)]
public PhysicVehicleSearchType SearchVehicle { get; set; }
Property Value
Type | Description |
---|---|
PhysicVehicleSearchType |
SuspensionDirection
Gets or sets the suspension direction.
Declaration
public Vector3 SuspensionDirection { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
SuspensionRestLength
Gets or sets the suspension rest length.
Declaration
public float SuspensionRestLength { get; set; }
Property Value
Type | Description |
---|---|
float |
WheelRadius
Gets or sets the wheel radius.
Declaration
public float WheelRadius { get; set; }
Property Value
Type | Description |
---|---|
float |
Remarks
If the entity has a MeshComponent, the radius is relative to the mesh size.
Methods
OnActivated()
Invoked when the object is activated once is attached.
Declaration
protected override void OnActivated()
Overrides
OnAttached()
Invoked when the object is attached to the system.
Declaration
protected override bool OnAttached()
Returns
Type | Description |
---|---|
bool | True if all is OK. |
Overrides
OnDeactivated()
Invoked when the object is deactivated.
Declaration
protected override void OnDeactivated()
Overrides
OnDetach()
Invoked when the object is detached.
Declaration
protected override void OnDetach()
Overrides
Start()
Invoked to start the object.
Declaration
protected override void Start()