Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
Copyright 1998-2011 Epic Games, Inc. All Rights Reserved.
Core.Object | +-- GameFramework.GameCameraBase | +-- GameFramework.GameThirdPersonCamera
Constants Summary |
---|
Inherited Contants from Core.Object |
---|
AspectRatio16x9, AspectRatio4x3, AspectRatio5x4, DegToRad, DegToUnrRot, INDEX_NONE, InvAspectRatio16x9, InvAspectRatio4x3, InvAspectRatio5x4, MaxInt, Pi, RadToDeg, RadToUnrRot, UnrRotToDeg, UnrRotToRad |
Inherited Variables from GameFramework.GameCameraBase |
---|
bResetCameraInterpolation, PlayerCamera |
Inherited Variables from Core.Object |
---|
Class, HashNext, HashOuterNext, Linker, LinkerIndex, Name, NetIndex, ObjectArchetype, ObjectFlags, ObjectInternalInteger, Outer, StateFrame, VfTableObject |
Enumerations Summary |
---|
Inherited Enumerations from Core.Object |
---|
AlphaBlendType, EAspectRatioAxisConstraint, EAutomatedRunResult, EAxis, EDebugBreakType, EInputEvent, EInterpCurveMode, EInterpMethodType, ETickingGroup |
Structures Summary | ||
---|---|---|
CamFocusPointParams FocusActor, FocusBoneName, FocusWorldLoc, CameraFOV, InterpSpeedRange, InFocusFOV, bAlwaysFocus, bAdjustCamera, bIgnoreTrace, FocusPitchOffsetDeg | ||
PenetrationAvoidanceFeeler AdjustmentRot, WorldWeight, PawnWeight, Extent, TraceInterval, FramesUntilNextTrace |
Functions Summary | ||
---|---|---|
![]() | AdjustFocusPointInterpolation (rotator Delta)) | |
![]() | AdjustTurn (int AngleOffset)) | |
![]() | BeginTurn (int StartAngle, int EndAngle, float TimeSec, optional float DelaySec, optional bool bAlignTargetWhenFinished)) | |
![]() | ClearFocusPoint (optional bool bLeaveCameraRotation)) | |
![]() | GameThirdPersonCameraMode | CreateCameraMode (class<GameThirdPersonCameraMode> ModeClass)) |
![]() | EndTurn () | |
![]() | GameThirdPersonCameraMode | FindBestCameraMode (Pawn P)) |
![]() | vector | GetActualFocusLocation ())) |
![]() | float | GetDesiredFOV (Pawn ViewedPawn )) |
![]() | Actor | GetFocusActor ())) |
![]() | Init ())) | |
![]() | ModifyPostProcessSettings (out PostProcessSettings PP)) | |
![]() | OnBecomeActive (GameCameraBase OldCamera )) | |
![]() | PlayerUpdateCamera (Pawn P, GamePlayerCamera CameraActor, float DeltaTime, out TViewTarget OutVT) | |
![]() | ProcessViewRotation (float DeltaTime, Actor ViewTarget, out Rotator out_ViewRotation, out Rotator out_DeltaRot )) | |
![]() | Reset ())) | |
![]() | ResetInterpolation ())) | |
![]() | SetFocusOnActor (Actor FocusActor, Name FocusBoneName, Vector2d InterpSpeedRange, Vector2d InFocusFOV, optional float CameraFOV, optional bool bAlwaysFocus, optional bool bAdjustCamera, optional bool bIgnoreTrace, optional float FocusPitchOffsetDeg
)) | |
![]() | SetFocusOnLoc (vector FocusWorldLoc, Vector2d InterpSpeedRange, Vector2d InFocusFOV, optional float CameraFOV, optional bool bAlwaysFocus, optional bool bAdjustCamera, optional bool bIgnoreTrace, optional float FocusPitchOffsetDeg
)) | |
![]() | UpdateCamera (Pawn P, GamePlayerCamera CameraActor, float DeltaTime, out TViewTarget OutVT)) | |
![]() | UpdateCameraMode (Pawn P)) | |
![]() | UpdateFocusPoint (Pawn P )) |
Inherited Functions from GameFramework.GameCameraBase |
---|
DisplayDebug, Init, ModifyPostProcessSettings, OnBecomeActive, OnBecomeInActive, ProcessViewRotation, ResetInterpolation, UpdateCamera |
Variables Detail |
---|
Set to TRUE when the Pivot makes a big jump if you want to keep the camera in place across that transition.
do we have a focus point set?
Internal. TRUE if the focus point was good and the camera looked at it, FALSE otherwise (e.g. failed the trace).
direct look vars
Last actual camera origin position, for lazy cam interpolation. It's only applied to player's origin, not view offsets, for faster/smoother response
Last actual camera origin rotation, for lazy cam interpolation. It's only applied to player's origin, not view offsets, for faster/smoother response
Last pawn relative offset, for slow offsets interpolation. This is because this offset is relative to the Pawn's rotation, which can change abruptly (when snapping to cover). Used to adjust the camera origin (evade, lean, pop up, blind fire, reload..)
last CamFOV for war cam interpolation
Last time focus point changed (location)
Last focus point location
last offset adjustment, for smooth blend out
Cached ideal pivot loc
Cached ideal pivot rot
Offset adjustment from last tick, used for interpolation.
last adjusted pitch, for smooth blend out
Saved data for camera turn "align when finished" functionality
Last location and rotation of the camera, cached before camera modifiers are applied.
View relative offset. This offset is relative to Controller's rotation, mainly used for Pitch positioning.
last adjusted Yaw, for smooth blend out
pitch adjustment when keeping target is done in 2 parts. this is the amount to pitch in part 2 (post view offset application)
Percentage of distance blocked by collision. From worst location, to desired location.
Vars for code-driven camera turns
obstruction pct from origin to worstloc origin
Change in camera mode happened this frame - reset on first call to PlayerUpdateCamera
current focus point
move back pct based on move up
time it takes for fast interpolation speed to kick in
number of tries to have focus in view
Z offset step for every try
toggles debug mode
Current GearCam Mode
origin offset interpolation speed
Time to transition from ideal location to blocked position, after camera collision with geometry. (used only by predictive feelers)
Time to transition from blocked location to ideal position, after camera collision with geometry.
camera extent scale to use when calculating penetration for this segment
Base camera position when walking
camera extent scale to use when calculating penetration for this segment
Structures Detail |
---|
var(GameThirdPersonCamera) bool bAdjustCamera;};
var(GameThirdPersonCamera) bool bAlwaysFocus;
var(GameThirdPersonCamera) bool bIgnoreTrace;
var(GameThirdPersonCamera) float CameraFOV;
var(GameThirdPersonCamera) Actor FocusActor;
var(GameThirdPersonCamera) Name FocusBoneName;
var(GameThirdPersonCamera) float FocusPitchOffsetDeg;
var(GameThirdPersonCamera) vector FocusWorldLoc;
var(GameThirdPersonCamera) vector2d InFocusFOV;
var(GameThirdPersonCamera) vector2d InterpSpeedRange;
Camera focus point definition
bAdjustCamera:If TRUE, camera adjusts to keep player in view, if FALSE the camera remains fixed and just rotates in placebAlwaysFocus:If FALSE, focus only if point roughly in view; if TRUE, focus no matter where player is lookingbIgnoreTrace:If TRUE, ignore world trace to find a good spotCameraFOV:If >0, FOV to force upon camera while looking at this point (degrees)FocusActor:Actor to focus on.FocusBoneName:Bone name to focus on. Ignored if FocusActor is None or has no SkeletalMeshComponentFocusPitchOffsetDeg:Offsets the pitch. e.g. 20 will look 20 degrees above the targetFocusWorldLoc:Focus point location in world space. Ignored if FocusActor is not None.InFocusFOV:FOV where target is considered in focus, no correction is made. X is yaw tolerance, Y is pitch tolerance.InterpSpeedRange:Interpolation speed (X=slow/focus loc moving, Y=fast/focus loc steady/blending out)
var(GameThirdPersonCamera) Rotator AdjustmentRot;};
var(GameThirdPersonCamera) vector Extent;
var transient int FramesUntilNextTrace;
var(GameThirdPersonCamera) float PawnWeight;
var(GameThirdPersonCamera) int TraceInterval;
var(GameThirdPersonCamera) float WorldWeight;
Struct defining a feeler ray used for camera penetration avoidance.
AdjustmentRot:rotator describing deviance from main rayExtent:extent to use for collision when firing this rayFramesUntilNextTrace:number of frames since this feeler was usedPawnWeight:how much this feeler affects the final position if it hits a Pawn (setting to 0 will not attempt to collide with pawns at all)TraceInterval:minimum frame interval between traces with this feeler if nothing was hit last frameWorldWeight:how much this feeler affects the final position if it hits the world
Functions Detail |
---|
Use this if you keep the same focus point, but move the camera basis around underneath it e.g. you want the camera to hold steady focus, but the camera target is rotating
Adjusts a camera rotation. Useful for situations where the basis of the rotation changes.
@param AngleOffset Yaw adjustment to apply (in Rotator units)
Initiates a forced camera rotation.
@param StartAngle Starting Yaw offset (in Rotator units)
@param EndAngle Finishing Yaw offset (in Rotator units)
@param TimeSec How long the rotation should take
@param DelaySec How long to wait before starting the rotation
Clear focus point
Internal.
Stops a camera rotation.
Evaluates the game state and returns the proper camera mode.
@return new camera mode to use
Internal. Returns the world space position of the current focus point.
returns camera mode desired FOV
Returns ref to the actor currently being used as a focus point, if any.
Called when Camera mode becomes active
Internal camera updating code
Gives cameras a chance to change player view rotation
Tells camera to focus on the given actor.
Tells camera to focus on the given world position.
Player Update Camera code
Update current camera modes. Pick Best, handle transitions, etc.
Per-tick focus point processing, for polling gamestate and adjusting as desired. Override if you want other systems or criteria to set focus points.
Defaultproperties |
---|
defaultproperties { PenetrationBlendOutTime=0.15f PenetrationBlendInTime=0.1f PenetrationBlockedPct=1.f PenetrationExtentScale=1.f WorstLocPenetrationExtentScale=1.f WorstLocInterpSpeed=8 bResetCameraInterpolation=TRUE OriginOffsetInterpSpeed=8 Focus_BackOffStrength=0.33f Focus_StepHeightAdjustment= 64 Focus_MaxTries=4 Focus_FastAdjustKickInTime=0.5 bDoingACameraTurn=FALSE DirectLookInterpSpeed=6.f PenetrationAvoidanceFeelers(0)=(AdjustmentRot=(Pitch=0,Yaw=0,Roll=0),WorldWeight=1.f,PawnWeight=1.f,Extent=(X=14,Y=14,Z=14)) PenetrationAvoidanceFeelers(1)=(AdjustmentRot=(Pitch=0,Yaw=3072,Roll=0),WorldWeight=0.75f,PawnWeight=0.75f,Extent=(X=0,Y=0,Z=0), TraceInterval=3) PenetrationAvoidanceFeelers(2)=(AdjustmentRot=(Pitch=0,Yaw=-3072,Roll=0),WorldWeight=0.75f,PawnWeight=0.75f,Extent=(X=0,Y=0,Z=0), TraceInterval=3) PenetrationAvoidanceFeelers(3)=(AdjustmentRot=(Pitch=0,Yaw=6144,Roll=0),WorldWeight=0.5f,PawnWeight=0.5f,Extent=(X=0,Y=0,Z=0), TraceInterval=5) PenetrationAvoidanceFeelers(4)=(AdjustmentRot=(Pitch=0,Yaw=-6144,Roll=0),WorldWeight=0.5f,PawnWeight=0.5f,Extent=(X=0,Y=0,Z=0), TraceInterval=5) PenetrationAvoidanceFeelers(5)=(AdjustmentRot=(Pitch=3640,Yaw=0,Roll=0),WorldWeight=1.f,PawnWeight=1.f,Extent=(X=0,Y=0,Z=0), TraceInterval=4) PenetrationAvoidanceFeelers(6)=(AdjustmentRot=(Pitch=-3640,Yaw=0,Roll=0),WorldWeight=0.5f,PawnWeight=0.5f,Extent=(X=0,Y=0,Z=0), TraceInterval=4) ThirdPersonCamDefaultClass=class'GameThirdPersonCameraMode_Default' } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |