SFVehicle.SFPropellorComponent

00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
//=============================================================================
// Spatial Fear
// Name: SFPropellorComponent
// Description: A vehicle component with propellor/engine-like behavior; rotates based on velocity of parent vehicle
//
// Author: Gert Jen Peltenburg
//=============================================================================
class SFPropellorComponent expands SFVehicle;
var (SpatialFear_Propellor) float MaxRevsPerSecond; // how quickly the propellor will rotate
var (SpatialFear_Propellor) bool bConstantSpeed;

// propellor only rotates. the actual propulsion is handled by drivablefeedbacks and the
// main drivable
simulated function DoPhysics(float DeltaTime)
{
}

simulated function RotationPhysics(float deltatime)
{
 if(MainSFVehicle!=self) {
  if(bConstantSpeed) 
   CurrentRotation.roll+=MaxRevsPerSecond*65536.0*deltatime;
  else
   CurrentRotation.roll+=MaxRevsPerSecond*MainSFVehicle.DesiredSpeed/MainSFVehicle.MaxSpeed*65536.0*deltatime;
 }
}

defaultproperties
{
     MaxRevsPerSecond=10.000000
     PhysicalRotationRate=(Pitch=16384,Yaw=16384,Roll=16384)
     Mesh=LodMesh'UnrealShare.Fan2M'
}

class file time: 12/7/2003 3:58:26 PM - creation time: 12/7/2003 4:03:45 PM
Created with UnCodeX