## XIII
Class XIIIWheel

source: C:\XIII\XIII\Classes\XIIIWheel.uc

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.VehiclePart
             |
             +--XIII.XIIIWheel

Direct Known Subclasses:AmbulanceFrontWheel, AmbulanceRearWheel, DeckTruckWheel, GMCBackWheel, GMCFrontWheel, HummerWheel, JeepUSWheel, JeepWheel, OldsmobileWheel, PickupWheel, PoliceNYWheel, TaxiWheel, TruckFrontWheel, TruckRearWheel, Van01Wheel

class XIIIWheel
extends Engine.VehiclePart

Variables
`vector` | `OldLocation`
`float` | `WheelRadius`

Function Summary
`void` | `Update(float dt)`

Source Code

    00001	class XIIIWheel extends VehiclePart;
    00002
    00003	//function Update(float DeltaTime);
    00004	VAR float	WheelRadius;
    00005	VAR vector	OldLocation;
    00006
    00007	EVENT PostBeginPlay()
    00008	{
    00009		OldLocation=Owner.Location;
    00010		SetBase(Owner);
    00011	}
    00012
    00013	FUNCTION Update(float dt)
    00014	{
    00015		LOCAL float sp;
    00016
    00017		sp=VSize(Owner.Location-OldLocation);
    00018		OldLocation=Owner.Location;
    00019		if (sp>0)
    00020		{
    00021			RotationRate.Roll= -sp/dt/WheelRadius*10435;
    00022			SetPhysics(PHYS_Rotating);
    00023		}
    00024		else
    00025			SetPhysics(PHYS_None);
    00026	}
    00027
    00028
    00029
    00030	defaultproperties
    00031	{
    00032	     WheelRadius=44.000000
    00033	     bCollideActors=True
    00034	     bBlockActors=True
    00035	     bBlockPlayers=True
    00036	     bFixedRotationDir=True
    00037	     RotationRate=(Roll=-50000)
    00038	}

End Source Code