Gah - a solution with more questions. – EntropicLqd

UE3:SVehicle (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> Actor >> Pawn >> Vehicle >> SVehicle
Package: 
Engine
Direct subclasses:
GameVehicle, UTVehicleBase
This class in other games:
U2, UT2004, UE2Runtime, UT3

SVehicle

Properties[edit]

See SVehicle properties.

Structs[edit]

VehicleState[edit]

Modifiers: native

Actor.RigidBodyState RBState 
byte ServerBrake 
byte ServerGas 
byte ServerSteering 
byte ServerRise 
bool bServerHandbrake 
int ServerView 
Pitch and Yaw - 16 bits each

Functions[edit]

Native functions[edit]

AddForce[edit]

native function AddForce (Object.Vector Force)


AddImpulse[edit]

native function AddImpulse (Object.Vector Impulse)


AddTorque[edit]

native function AddTorque (Object.Vector Torque)


HasWheelsOnGround[edit]

simulated native function bool HasWheelsOnGround ()

HasWheelsOnGround() returns true if any of vehicles wheels are currently in contact with the ground (wheel has bWheelOnGround==true)

InitVehicleRagdoll[edit]

native function InitVehicleRagdoll (SkeletalMesh RagdollMesh, PhysicsAsset RagdollPhysAsset, Object.Vector ActorMove, bool bClearAnimTree)

Utility for switching the vehicle from a single body to an articulated ragdoll-like one given a new mesh and physics asset. ActorMove is an extra translation applied to Actor during the transition, which can be useful to avoid ragdoll mesh penetrating into the ground.

IsSleeping[edit]

native function bool IsSleeping ()


SetWheelCollision[edit]

native final function SetWheelCollision (int WheelNum, bool bCollision)

turns on or off a wheel's collision

Parameters:

  • WheelNum - the index of the wheel in the Wheels array to change
  • bCollision - whether to turn collision on or off

Events[edit]

Destroyed[edit]

simulated event Destroyed ()

Overrides: Vehicle.Destroyed


PostBeginPlay[edit]

simulated event PostBeginPlay ()

Overrides: Vehicle.PostBeginPlay

Called when gameplay begins. Used to make sure the engine sound audio component has the right properties set to ensure it gets restarted if it has been cut out due to the audio code running out of HW channels to play the sound in.

PostInitAnimTree[edit]

simulated event PostInitAnimTree (SkeletalMeshComponent SkelComp)

Overrides: Pawn.PostInitAnimTree

Store pointer to each wheel's SkelControlWheel.

RigidBodyCollision[edit]

simulated event RigidBodyCollision (PrimitiveComponent HitComponent, PrimitiveComponent OtherComponent, const out Actor.CollisionImpactData RigidCollisionData, int ContactIndex)

Overrides: Actor.RigidBodyCollision

(Description copied from Actor.RigidBodyCollision)
Called when a PrimitiveComponent this Actor owns has:

   -bNotifyRigidBodyCollision set to true
   -ScriptRigidBodyCollisionThreshold > 0
   -it is involved in a physics collision where the relative velocity exceeds ScriptRigidBodyCollisionThreshold

Parameters:

  • HitComponent - the component of this Actor that collided
  • OtherComponent - the other component that collided
  • RigidCollisionData - information on the collision itslef, including contact points
  • ContactIndex - the element in each ContactInfos' ContactVelocity and PhysMaterial arrays that corresponds to this Actor/HitComponent

SuspensionHeavyShift[edit]

simulated event SuspensionHeavyShift (float Delta)

called when the suspension moves a large amount, passes the delta

Other instance functions[edit]

AddVelocity[edit]

function AddVelocity (Object.Vector NewVelocity, Object.Vector HitLocation, class<DamageTypeDamageType, optional Actor.TraceHitInfo HitInfo)

Overrides: Pawn.AddVelocity


CalcCamera[edit]

simulated function bool CalcCamera (float fDeltaTime, out Object.Vector out_CamLoc, out Object.Rotator out_CamRot, out float out_FOV)

Overrides: Actor.CalcCamera

Calculate camera view point, when viewing this actor.

Parameters:

  • fDeltaTime - delta time seconds since last update
  • out_CamLoc - Camera Location
  • out_CamRot - Camera Rotation
  • out_FOV - Field of View

Returns:

true if Pawn should provide the camera point of view.

Died[edit]

function bool Died (Controller Killer, class<DamageTypeDamageType, Object.Vector HitLocation)

Overrides: Vehicle.Died

(Description copied from Pawn.Died)
This pawn has died.

Parameters:

  • Killer - Who killed this pawn
  • DamageType - What killed it
  • HitLocation - Where did the hit occur

Returns:

true if allowed

DisplayDebug[edit]

simulated function DisplayDebug (HUD HUD, out float out_YL, out float out_YPos)

Overrides: Vehicle.DisplayDebug

(Description copied from Vehicle.DisplayDebug)


See: Actor::DisplayDebug

DisplayWheelsDebug[edit]

simulated function DisplayWheelsDebug (HUD HUD, float YL)

Special debug information for the wheels that is displayed at each wheel's location

DrivingStatusChanged[edit]

simulated function DrivingStatusChanged ()

Overrides: Vehicle.DrivingStatusChanged


GetDefaultCameraMode[edit]

simulated function name GetDefaultCameraMode (PlayerController RequestedBy)

Overrides: Vehicle.GetDefaultCameraMode

(Description copied from Pawn.GetDefaultCameraMode)
returns default camera mode when viewing this pawn. Mainly called when controller possesses this pawn.

Parameters:

  • PlayerController - requesting the default camera view

Returns:

default camera view player should use when controlling this pawn.

GetSVehicleDebug[edit]

simulated function GetSVehicleDebug (out array<stringDebugInfo)

Retrieves important SVehicle debug information as an array of strings. That can then be dumped or displayed on HUD.

HermiteEval[edit]

simulated function float HermiteEval (float Slip)

Hermite spline evaluation for use with the slip curve debug display

PostTeleport[edit]

function PostTeleport (Teleporter OutTeleporter)

Overrides: Actor.PostTeleport


SetAllWheelParticleSystem[edit]

simulated function SetAllWheelParticleSystem (ParticleSystem NewSystem)

Changes the wheel particle system for all wheels

StartEngineSound[edit]

simulated function StartEngineSound ()

turns on the engine sound

StartEngineSoundTimed[edit]

simulated function StartEngineSoundTimed ()

starts a timer of EngineStartOffsetSecs duration to turn on the engine sound

StopEngineSound[edit]

simulated function StopEngineSound ()

turns off the engine sound

StopEngineSoundTimed[edit]

simulated function StopEngineSoundTimed ()

starts a timer of EngineStopOffsetSecs duration to turn off the engine sound

StopVehicleSounds[edit]

simulated function StopVehicleSounds ()


TakeRadiusDamage[edit]

simulated function TakeRadiusDamage (Controller InstigatedBy, float BaseDamage, float DamageRadius, class<DamageTypeDamageType, float Momentum, Object.Vector HurtOrigin, bool bFullDamage, Actor DamageCauser, optional float DamageFalloffExponent)

Overrides: Vehicle.TakeRadiusDamage

Take Radius Damage by default scales damage based on distance from HurtOrigin to Actor's location. This can be overriden by the actor receiving the damage for special conditions (see KAsset.uc).

Parameters:

  • InstigatedBy - instigator of the damage
  • Base - Damage
  • Damage - Radius (from Origin)
  • DamageType - class
  • Momentum - float)
  • HurtOrigin - origin of the damage radius.
  • bFullDamage - if true, damage not scaled based on distance HurtOrigin
  • DamageCauser - the Actor that directly caused the damage (i.e. the Projectile that exploded, the Weapon that fired, etc)

TryToDrive[edit]

function bool TryToDrive (Pawn P)

Overrides: Vehicle.TryToDrive

TryToDrive() returns true if Pawn P successfully became driver of this vehicle

TurnOff[edit]

simulated function TurnOff ()

Overrides: Pawn.TurnOff

TurnOff() Freeze pawn - stop sounds, animations, physics, weapon firing

VehiclePlayEnterSound[edit]

simulated function VehiclePlayEnterSound ()


VehiclePlayExitSound[edit]

simulated function VehiclePlayExitSound ()