Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
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 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 |
/** * Copyright 1998-2011 Epic Games, Inc. All Rights Reserved. */ class AnimNotify_ViewShake extends AnimNotify_Scripted native(Anim); /** * Note: these shake-defining params are deprecated. Use ShakeParams. * Leaving them here for now for compatibility with existing content (which will be * upgraded via PostLoad()). */ /** Duration in seconds of shake */ var private editconst float Duration; /** view rotation amplitude (pitch,yaw,roll) */ var private editconst vector RotAmplitude; /** frequency of rotation shake */ var private editconst vector RotFrequency; /** relative view offset amplitude (x,y,z) */ var private editconst vector LocAmplitude; /** frequency of view offset shake */ var private editconst vector LocFrequency; /** fov shake amplitude */ var private editconst float FOVAmplitude; /** fov shake frequency */ var private editconst float FOVFrequency; var() bool bDoControllerVibration; /** Radius within which to shake player views. If 0 only plays on the animated player */ var() float ShakeRadius; /** Should use a bone location as the shake's epicenter? */ var() bool bUseBoneLocation; /** if so, bone name to use */ var() name BoneName; var() export editinline CameraShake ShakeParams; cpptext { virtual void PostLoad(); }; /** * Trigger the view shake * * @param Owner - the actor that is playing this animation * * @param AnimSeqInstigator - the anim sequence that triggered the notify */ event Notify(Actor Owner, AnimNodeSequence AnimSeqInstigator) { local vector ViewShakeOrigin; local Pawn P; local PlayerController PC; if (ShakeRadius == 0) { P = Pawn(Owner); if (P != None && P.IsLocallyControlled()) { PC = PlayerController(P.Controller); if (PC != None) { PC.ClientPlayCameraShake(ShakeParams); } } } else { // Figure out world origin of view shake if( bUseBoneLocation && AnimSeqInstigator != None && AnimSeqInstigator.SkelComponent != None ) { ViewShakeOrigin = AnimSeqInstigator.SkelComponent.GetBoneLocation( BoneName ); } else { ViewShakeOrigin = Owner.Location; } // propagate to all player controllers if (Owner != None) { class'Camera'.static.PlayWorldCameraShake(ShakeParams, Owner, ViewShakeOrigin, 0.f, ShakeRadius, 1.f, bDoControllerVibration); } } } defaultproperties { ShakeRadius=4096.0 Duration=1.f RotAmplitude=(X=100,Y=100,Z=200) RotFrequency=(X=10,Y=10,Z=25) LocAmplitude=(X=0,Y=3,Z=6) LocFrequency=(X=1,Y=10,Z=20) FOVAmplitude=2 FOVFrequency=5 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |