I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX

UE2:KCar (U2)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
U2 Object >> Actor >> Pawn >> Vehicle >> KVehicle >> KCar
Package: 
Vehicles
Direct subclass:
XMPVehicle
This class in other games:
UT2003, UT2004

Base class for 4-wheeled vehicles using Karma Assumes negative-X is forward, negative-Y is right

Properties

Property group 'KCar'

ChassisMass

Type: float


Default value: 4.0

EngineBraking

Type: bool


HandbrakeThresh

Type: float

speed above which handbrake comes on =]

Default value: 1000.0

MaxBrakeTorque

Type: float

Braking torque applied to all four wheels. Positive only.

Default value: 50.0

MaxNetUpdateInterval

Type: float


Default value: 0.4

MaxSteerAngle

Type: float

(65535 = 360 deg)

Default value: 3900.0

MaxWheelSpeed

Type: float


Default value: 1310700.0

RearTireClass

Type: class<KTire>


SprintForce

Type: float


Default value: 1500.0

SprintTime

Type: float


Default value: 0.5

SteerPropGap

Type: float


Default value: 1000.0

SteerSpeed

Type: float


Default value: 15000.0

SteerTorque

Type: float


Default value: 1000.0

StopThreshold

Type: float

Forward velocity under which brakes become drive.

Default value: 100.0

SuspDamping

Type: float


Default value: 5.0

SuspHighLimit

Type: float


Default value: 1.0

SuspLowLimit

Type: float


Default value: -1.0

SuspRef

Type: float


SuspStiffness

Type: float


Default value: 50.0

TireAdhesion

Type: float


TireHandbrakeFriction

Type: float

Additional lateral friction when handbrake engaged

Default value: -0.5

TireHandbrakeSlip

Type: float

Additional lateral slip when handbrake engaged

Default value: 0.06

TireLateralFriction

Type: float


Default value: 1.0

TireLateralSlip

Type: float


Default value: 0.06

TireMass

Type: float


Default value: 0.5

TireMinSlip

Type: float


Default value: 0.0010

TireRestitution

Type: float


TireRollFriction

Type: float


Default value: 1.0

TireRollSlip

Type: float


Default value: 0.085

TireSlipRate

Type: float


Default value: 5.0E-4

TireSoftness

Type: float


Default value: 2.0E-4

TorqueCurve

Type: Object.InterpCurve

Engine RPM in, Torque out.

Default value:

Member Value
Points
Member Value
OutVal 150.0
Member Value
InVal 245756.0
OutVal 150.0
Member Value
InVal 491512.0

TorqueSplit

Type: float

front/rear drive torque split. 1 is fully RWD, 0 is fully FWD. 0.5 is standard 4WD.

Default value: 0.5

Internal variables

bIsInverted

Type: bool


bNewCarState

Type: bool

Indicated there is new data processed, and chassis RBState should be updated.

CarState

Type: KCarState

This is replicated to the car, and processed to update all the parts.

ChassisState

Type: Actor.KRigidBodyState


EnergyAccumulator

Type: float


ForwardVel

Type: float

Component of cars velocity in its forward direction.

Gear

Type: int


Default value: 1

IsDriving

Type: bool


NextNetUpdateTime

Type: float


OfflineSound

Type: Sound


Default value: Sound'VehiclesA.Generic.Error'

OutputBrake

Type: bool


OutputHandbrakeOn

Type: bool


OutputTorque

Type: float


SprintSound

Type: Sound


Default value: Sound'U2Ambient2A.ShipEngines.Dropship_AttitudeEnd'

SprintTimeLeft

Type: float


WheelFrontAcross

Type: float

Modifiers: const


Default value: 140.0

WheelFrontAlong

Type: float

Modifiers: const


Default value: -180.0

WheelRearAcross

Type: float

Modifiers: const


Default value: 140.0

WheelRearAlong

Type: float

Modifiers: const


Default value: 160.0

WheelSpinSpeed

Type: float

Current (averaged) RPM of rear wheels

Default values

Property Value
bUseCompressedPosition False
WheelVert -0.5

Structs

KCarState

Actor.KRBVec ChassisPosition 
Object.Quat ChassisQuaternion 
Actor.KRBVec ChassisLinVel 
Actor.KRBVec ChassisAngVel 
float WheelHeight[4]  
FL, FR, RL, RR
float FrontWheelAng[2]  
FL, FR
float WheelVertVel[4]  
float ServerSteering 
float ServerTorque 
bool ServerBrake 
bool ServerHandbrakeOn 
bool bNewState 
Set to true whenever a new state is received and should be processed

Functions

Events

Destroyed

simulated event Destroyed ()

Overrides: Vehicle.Destroyed


KApplyForce

simulated event KApplyForce (out Object.Vector Force, out Object.Vector Torque)

Overrides: Actor.KApplyForce


KUpdateState

simulated event bool KUpdateState (out Actor.KRigidBodyState newState)

Overrides: Actor.KUpdateState


KVehicleUpdateParams

simulated event KVehicleUpdateParams ()

Overrides: KVehicle.KVehicleUpdateParams


PostNetBeginPlay

simulated event PostNetBeginPlay ()

Overrides: Vehicle.PostNetBeginPlay


Tick

simulated event Tick (float Delta)

Overrides: Vehicle.Tick


VehicleStateReceived

simulated event VehicleStateReceived ()

Overrides: KVehicle.VehicleStateReceived


Other instance functions

DoSprint

simulated function DoSprint ()

Overrides: Vehicle.DoSprint


Engine

function float Engine (float Throttle)


PackState

function PackState ()


ProcessCarInput

function ProcessCarInput ()


ServerSprint

function ServerSprint ()