Skip to content
CRUSHFORMV1.1.0
GET IT ON FAB

REFERENCESTRUCTS AND ENUMS

FCFWheelContact

MODULECrushformINCLUDECFTypes.h

One wheel, on the ground or not, as the host sees it this frame.

Functions

AUTHORITY · server, every machineLOCAL · this machinePURE · read only
float GetRollingSpeed() const
PUREC++ ONLY

The speed the rolling sound and FX follow: RollingSpeed when it is set, else |SurfaceSpeed|.

Properties

FVector Point = FVector::ZeroVector

Where the tyre touches the ground, world space, cm.

Default
FVector::ZeroVector
Category
Crushform
float Radius = 0.0f

Wheel radius, cm.

Default
0.0f
Category
Crushform
float SurfaceSpeed = 0.0f

Speed of the tyre's surface, m/s, positive when it rolls the body forward (+X of the root). A wheel spinning in place has one too.

Default
0.0f
Category
Crushform
TObjectPtr<UPhysicalMaterial> PhysicalMaterial

The ground under the wheel; null takes the default rates.

Category
Crushform
int32 WheelIndex = INDEX_NONE

Which wheel this is, the same for the host's lifetime: small, dense and from 0 (the component keeps the last surface of each in an array by it). INDEX_NONE for a host that does not name its wheels: the contact still dirties the body, but it is never reported by UCFDeformComponent::OnWheelSurfaceChanged.

Default
INDEX_NONE
Category
Crushform
bool bGrounded = true

False while the wheel is in the air: it leaves no dirt, and its Point and PhysicalMaterial are not read.

Default
true
Category
Crushform
bool bSurfaceKnown = true

False while grounded but this frame's surface read is torn: the rolling sound and FX keep what they had.

Default
true
Category
Crushform
float RollingSpeed = -1.0f

Speed the rolling sound and FX follow, m/s; below 0 means |SurfaceSpeed|.

Default
-1.0f
Category
Crushform
float GroundSpeed = -1.0f

Speed the wheel's hub moves over the ground, m/s; below 0 means the owner's velocity. The rolling FX reads it (a locked wheel sliding still throws dirt); a host that knows the shown speed of a replicated body gives that one.

Default
-1.0f
Category
Crushform
float Braking = 0.0f

0..1, how hard this wheel brakes: raises the rolling FX.

Default
0.0f
Category
Crushform
TObjectPtr<USceneComponent> AttachTo

Where this wheel's sound sits; null: at Point.

Category
Crushform
FName AttachSocket

Socket on AttachTo for this wheel's sound; None: the component's origin.

Category
Crushform