The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall
UE3:GameThirdPersonCamera (UDK)
Object >> GameCameraBase >> GameThirdPersonCamera |
Contents
- 1 Properties
- 1.1 Property group 'Debug'
- 1.2 Property group 'Focus'
- 1.3 Property group 'GameThirdPersonCamera'
- 1.3.1 bDrawDebug
- 1.3.2 CurrentCamMode
- 1.3.3 DirectLookInterpSpeed
- 1.3.4 OffsetAdjustmentInterpSpeed
- 1.3.5 OriginOffsetInterpSpeed
- 1.3.6 PenetrationAvoidanceFeelers
- 1.3.7 PenetrationBlendInTime
- 1.3.8 PenetrationBlendOutTime
- 1.3.9 PenetrationExtentScale
- 1.3.10 ThirdPersonCamDefault
- 1.3.11 ThirdPersonCamDefaultClass
- 1.3.12 WorstLocInterpSpeed
- 1.3.13 WorstLocPenetrationExtentScale
- 1.4 Internal variables
- 1.4.1 ActualFocusPointWorldLoc
- 1.4.2 bDoingACameraTurn
- 1.4.3 bDoingDirectLook
- 1.4.4 bFocusPointSet
- 1.4.5 bFocusPointSuccessful
- 1.4.6 bTurnAlignTargetWhenFinished
- 1.4.7 DirectLookYaw
- 1.4.8 LastActualCameraOrigin
- 1.4.9 LastActualCameraOriginRot
- 1.4.10 LastActualOriginOffset
- 1.4.11 LastCamFOV
- 1.4.12 LastFocusChangeTime
- 1.4.13 LastFocusPointLoc
- 1.4.14 LastHeightAdjustment
- 1.4.15 LastOffsetAdjustment
- 1.4.16 LastPitchAdjustment
- 1.4.17 LastPostCamTurnYaw
- 1.4.18 LastPreModifierCameraLoc
- 1.4.19 LastPreModifierCameraRot
- 1.4.20 LastViewOffset
- 1.4.21 LastWorstLocationLocal
- 1.4.22 LastYawAdjustment
- 1.4.23 LeftoverPitchAdjustment
- 1.4.24 PenetrationBlockedPct
- 1.4.25 TurnCurTime
- 1.4.26 TurnDelay
- 1.4.27 TurnEndAngle
- 1.4.28 TurnStartAngle
- 1.4.29 TurnTotalTime
- 1.4.30 WorstLocBlockedPct
- 2 Structs
- 3 Functions
- 3.1 Native functions
- 3.2 Events
- 3.3 Other instance functions
- 3.3.1 AdjustFocusPointInterpolation
- 3.3.2 AdjustTurn
- 3.3.3 BeginTurn
- 3.3.4 ClearFocusPoint
- 3.3.5 CreateCameraMode
- 3.3.6 FindBestCameraMode
- 3.3.7 GetActualFocusLocation
- 3.3.8 GetFocusActor
- 3.3.9 Init
- 3.3.10 OnBecomeActive
- 3.3.11 ProcessViewRotation
- 3.3.12 Reset
- 3.3.13 ResetInterpolation
- 3.3.14 SetFocusOnActor
- 3.3.15 SetFocusOnLoc
- 3.3.16 UpdateCamera
- 3.3.17 UpdateCameraMode
- Package:
- GameFramework
This is an auto-generated page and may need human attention. Please remove the {{autogenerated}} tag if the page seems reasonably complete or replace it with the {{expand}} tag if the page is not yet complete. |
Properties
Property group 'Debug'
bDebugChangedCameraMode
Type: bool
Change in camera mode happened this frame - reset on first call to PlayerUpdateCamera
Property group 'Focus'
Focus_BackOffStrength
Type: float
move back pct based on move up
Default value: 0.33
Focus_FastAdjustKickInTime
Type: float
time it takes for fast interpolation speed to kick in
Default value: 0.5
Focus_MaxTries
Type: int
number of tries to have focus in view
Default value: 4
Focus_StepHeightAdjustment
Type: float
Z offset step for every try
Default value: 64.0
FocusPoint
Type: CamFocusPointParams
current focus point
Property group 'GameThirdPersonCamera'
bDrawDebug
Type: bool
Modifiers: protected
toggles debug mode
CurrentCamMode
Type: GameThirdPersonCameraMode
Modifiers: editinline, transient
Current GearCam Mode
DirectLookInterpSpeed
Type: float
Default value: 6.0
OffsetAdjustmentInterpSpeed
Type: float
Modifiers: protected, const
We optionally interpolate the results of AdjustViewOffset() to prevent pops when a cameramode changes its adjustment suddenly.
Default value: 12.0
OriginOffsetInterpSpeed
Type: float
origin offset interpolation speed
Default value: 8.0
PenetrationAvoidanceFeelers
Type: array<PenetrationAvoidanceFeeler>
Default value, index 0:
Member | Value | ||||||||
---|---|---|---|---|---|---|---|---|---|
Extent |
|
||||||||
PawnWeight | 1.0 | ||||||||
WorldWeight | 1.0 |
Default value, index 1:
Member | Value | ||||||||
---|---|---|---|---|---|---|---|---|---|
AdjustmentRot |
|
||||||||
PawnWeight | 0.75 | ||||||||
WorldWeight | 0.75 |
Default value, index 2:
Member | Value | ||||||||
---|---|---|---|---|---|---|---|---|---|
AdjustmentRot |
|
||||||||
PawnWeight | 0.75 | ||||||||
WorldWeight | 0.75 |
Default value, index 3:
Member | Value | ||||||||
---|---|---|---|---|---|---|---|---|---|
AdjustmentRot |
|
||||||||
PawnWeight | 0.5 | ||||||||
WorldWeight | 0.5 |
Default value, index 4:
Member | Value | ||||||||
---|---|---|---|---|---|---|---|---|---|
AdjustmentRot |
|
||||||||
PawnWeight | 0.5 | ||||||||
WorldWeight | 0.5 |
Default value, index 5:
Member | Value | ||||||||
---|---|---|---|---|---|---|---|---|---|
AdjustmentRot |
|
||||||||
PawnWeight | 1.0 | ||||||||
WorldWeight | 1.0 |
Default value, index 6:
Member | Value | ||||||||
---|---|---|---|---|---|---|---|---|---|
AdjustmentRot |
|
||||||||
PawnWeight | 0.5 | ||||||||
WorldWeight | 0.5 |
PenetrationBlendInTime
Type: float
Time to transition from ideal location to blocked position, after camera collision with geometry. (used only by predictive feelers)
Default value: 0.1
PenetrationBlendOutTime
Type: float
Time to transition from blocked location to ideal position, after camera collision with geometry.
Default value: 0.15
PenetrationExtentScale
Type: float
camera extent scale to use when calculating penetration for this segment
Default value: 1.0
ThirdPersonCamDefault
Type: GameThirdPersonCameraMode
Modifiers: protected, editinline
Base camera position when walking
ThirdPersonCamDefaultClass
Type: class<GameThirdPersonCameraMode>
Modifiers: protected
Default value: Class'GameFramework.GameThirdPersonCameraMode_Default'
WorstLocInterpSpeed
Type: float
Default value: 8.0
WorstLocPenetrationExtentScale
Type: float
camera extent scale to use when calculating penetration for this segment
Default value: 1.0
Internal variables
ActualFocusPointWorldLoc
Type: Object.Vector
Modifiers: transient, protected
bDoingACameraTurn
Type: bool
Modifiers: protected
bDoingDirectLook
Type: bool
Modifiers: transient
bFocusPointSet
Type: bool
do we have a focus point set?
bFocusPointSuccessful
Type: bool
Modifiers: protected, transient
Internal. TRUE if the focus point was good and the camera looked at it, FALSE otherise (e.g. failed the trace).
bTurnAlignTargetWhenFinished
Type: bool
Modifiers: protected
DirectLookYaw
Type: int
Modifiers: transient
direct look vars
LastActualCameraOrigin
Type: Object.Vector
Modifiers: transient
Last actual camera origin position, for lazy cam interpolation. It's only applied to player's origin, not view offsets, for faster/smoother response
LastActualCameraOriginRot
Type: Object.Rotator
Modifiers: transient
LastActualOriginOffset
Type: Object.Vector
Modifiers: transient
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..)
LastCamFOV
Type: float
Modifiers: transient
last CamFOV for war cam interpolation
LastFocusChangeTime
Type: float
Modifiers: transient, protected
Last time focus point changed (location)
LastFocusPointLoc
Type: Object.Vector
Modifiers: transient, protected
Last focus point location
LastHeightAdjustment
Type: float
Modifiers: transient
last offset adjustment, for smooth blend out
LastOffsetAdjustment
Type: Object.Vector
Modifiers: protectedwrite, transient
Offset adjustment from last tick, used for interpolation.
LastPitchAdjustment
Type: float
Modifiers: transient
last adjusted pitch, for smooth blend out
LastPostCamTurnYaw
Type: int
Modifiers: protected, transient
Saved data for camera turn "align when finished" functionality
LastPreModifierCameraLoc
Type: Object.Vector
Modifiers: transient
Last location and rotation of the camera, cached before camera modifiers are applied.
LastPreModifierCameraRot
Type: Object.Rotator
Modifiers: transient
LastViewOffset
Type: Object.Vector
Modifiers: transient
View relative offset. This offset is relative to Controller's rotation, mainly used for Pitch positioning.
LastWorstLocationLocal
Type: Object.Vector
Modifiers: transient
LastYawAdjustment
Type: float
Modifiers: transient
last adjusted Yaw, for smooth blend out
LeftoverPitchAdjustment
Type: float
Modifiers: transient
pitch adjustment when keeping target is done in 2 parts. this is the amount to pitch in part 2 (post view offset application)
PenetrationBlockedPct
Type: float
Modifiers: protected
Percentage of distance blocked by collision. From worst location, to desired location.
Default value: 1.0
TurnCurTime
Type: float
Modifiers: protected
Vars for code-driven camera turns
TurnDelay
Type: float
Modifiers: protected
TurnEndAngle
Type: int
Modifiers: protected
TurnStartAngle
Type: int
Modifiers: protected
TurnTotalTime
Type: float
Modifiers: protected
WorstLocBlockedPct
Type: float
obstruction pct from origin to worstloc origin
Structs
CamFocusPointParams
Modifiers: native
Camera focus point definition
- Actor FocusActor
- Actor to focus on.
- name FocusBoneName
- Bone name to focus on. Ignored if FocusActor is None or has no SkeletalMeshComponent
- Object.Vector FocusWorldLoc
- Focus point location in world space. Ignored if FocusActor is not None.
- float CameraFOV
- If >0, FOV to force upon camera while looking at this point (degrees)
- Object.Vector2D InterpSpeedRange
- Interpolation speed (X=slow/focus loc moving, Y=fast/focus loc steady/blending out)
- Object.Vector2D InFocusFOV
- FOV where target is considered in focus, no correction is made. X is yaw tolerance, Y is pitch tolerance.
- bool bAlwaysFocus
- If FALSE, focus only if point roughly in view; if TRUE, focus no matter where player is looking
- bool bAdjustCamera
- If TRUE, camera adjusts to keep player in view, if FALSE the camera remains fixed and just rotates in place
- bool bIgnoreTrace
- If TRUE, ignore world trace to find a good spot
- float FocusPitchOffsetDeg
- Offsets the pitch. e.g. 20 will look 20 degrees above the target
PenetrationAvoidanceFeeler
Modifiers: native
Struct defining a feeler ray used for camera penetration avoidance.
- Object.Rotator AdjustmentRot
- rotator describing deviance from main ray
- float WorldWeight
- how much this feeler affects the final position if it hits the world
- float PawnWeight
- 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)
- Object.Vector Extent
- extent to use for collision when firing this ray
Functions
Native functions
EndTurn
Stops a camera rotation.
PlayerUpdateCamera
Internal camera updating code
Events
GetDesiredFOV
returns camera mode desired FOV
ModifyPostProcessSettings
Overrides: GameCameraBase.ModifyPostProcessSettings
UpdateFocusPoint
Per-tick focus point processing, for polling gamestate and adjusting as desired. Override if you want other systems or criteria to set focus points.
Other instance functions
AdjustFocusPointInterpolation
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
AdjustTurn
Adjusts a camera rotation. Useful for situations where the basis of the rotation changes.
Parameters:
- AngleOffset - Yaw adjustment to apply (in Rotator units)
BeginTurn
Initiates a forced camera rotation.
Parameters:
- StartAngle - Starting Yaw offset (in Rotator units)
- EndAngle - Finishing Yaw offset (in Rotator units)
- TimeSec - How long the rotation should take
- DelaySec - How long to wait before starting the rotation
ClearFocusPoint
Clear focus point
CreateCameraMode
Internal.
FindBestCameraMode
Evaluates the game state and returns the proper camera mode.
Returns:
- new camera mode to use
GetActualFocusLocation
Internal. Returns the world space position of the current focus point.
GetFocusActor
Returns ref to the actor currently being used as a focus point, if any.
Init
Overrides: GameCameraBase.Init
OnBecomeActive
Overrides: GameCameraBase.OnBecomeActive
Called when Camera mode becomes active
ProcessViewRotation
Overrides: GameCameraBase.ProcessViewRotation
Gives cameras a chance to change player view rotation
Reset
ResetInterpolation
Overrides: GameCameraBase.ResetInterpolation
Called to indicate that the next update should skip interpolation and snap to desired values.
SetFocusOnActor
Tells camera to focus on the given actor.
SetFocusOnLoc
Tells camera to focus on the given world position.
UpdateCamera
Overrides: GameCameraBase.UpdateCamera
Player Update Camera code
UpdateCameraMode
Update current camera modes. Pick Best, handle transitions, etc.