Core.Object | +--Engine.Actor | +--Engine.Info | +--Engine.ZoneInfo | +--Engine.SkyZoneInfo | +--RuneI.SkyZoneInfoOsc
rotator
MaxDeviation
OriginalRotation
float
SpeedScale
TimePassed
simulated
PreBeginPlay()
//var() float ZoomSpeedScale; //var() float ZoomMaxDeviation;
Tick(float DeltaTime)
00001 //============================================================================= 00002 // SkyZoneInfoOsc. 00003 //============================================================================= 00004 class SkyZoneInfoOsc extends SkyZoneInfo; 00005 00006 var float TimePassed; 00007 //var float TimePassedZoom; 00008 var rotator OriginalRotation; 00009 //var float OriginalDrawScale; 00010 00011 var() rotator MaxDeviation; 00012 var() float SpeedScale; 00013 //var() float ZoomSpeedScale; 00014 //var() float ZoomMaxDeviation; 00015 00016 00017 simulated function PreBeginPlay() 00018 { 00019 Super.PreBeginPlay(); 00020 00021 OriginalRotation = Rotation; 00022 // OriginalDrawScale = DrawScale; 00023 } 00024 00025 simulated function Tick(float DeltaTime) 00026 { 00027 local rotator rot; 00028 00029 Super.Tick(DeltaTime); 00030 00031 TimePassed += DeltaTime*SpeedScale; 00032 00033 rot = OriginalRotation; 00034 rot.Pitch += sin(TimePassed) * MaxDeviation.Pitch; 00035 rot.Yaw += sin(TimePassed) * MaxDeviation.Yaw; 00036 rot.Roll += sin(TimePassed) * MaxDeviation.Roll; 00037 00038 SetRotation(rot); 00039 00040 // TimePassedZoom += DeltaTime*ZoomSpeedScale; 00041 // DrawScale = OriginalDrawScale + sin(TimePassedZoom) * ZoomMaxDeviation; 00042 } 00043 00044 defaultproperties 00045 { 00046 MaxDeviation=(Pitch=2048,Roll=1024) 00047 SpeedScale=1.000000 00048 bStatic=False 00049 }