The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall

UE3:LocalPlayer (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 12:47, 6 November 2009 by (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UDK Object >> Player >> LocalPlayer
Package: 
Engine
Within class: 
Engine
This class in other games:
UT3

LocalPlayer

Properties

ActorVisibilityHistory

Type: SynchronizedActorVisibilityHistory

Modifiers: private, native, transient, const


bOverridePostProcessSettings

Type: bool

Whether to override the post process settings or not

bSentSplitJoin

Type: bool

Modifiers: const, editconst, transient

set when we've sent a split join request

ControllerId

Type: int

The controller ID which this player accepts input from.

CurrentPPInfo

Type: CurrentPostProcessVolumeInfo

Modifiers: const, noimport, transient

current state of post process info set in the scene

LastViewLocation

Type: Object.Vector

Modifiers: transient

The location of the player's view the previous frame.

Origin

Type: Object.Vector2D

The coordinates for the upper left corner of the master viewport subregion allocated to this player. 0-1

PlayerPostProcess

Type: PostProcessChain

Modifiers: const

Chain of post process effects for this player view

PlayerPostProcessChains

Type: array<PostProcessChain>

Modifiers: const


PostProcessSettingsOverride

Type: PostProcessVolume.PostProcessSettings

The post process settings to override to

Default value:

Member Value
bAllowAmbientOcclusion True
bEnableBloom True
bEnableMotionBlur True
bEnableSceneEffect True
Bloom_InterpolationDuration 1.0
Bloom_Scale 1.0
DOF_BlurKernelSize 16.0
DOF_FalloffExponent 4.0
DOF_FocusInnerRadius 2000.0
DOF_InterpolationDuration 1.0
DOF_MaxFarBlurAmount 1.0
DOF_MaxNearBlurAmount 1.0
DOF_ModulateBlurColor
Member Value
A 255
B 255
G 255
R 255
MotionBlur_Amount 0.5
MotionBlur_CameraRotationThreshold 45.0
MotionBlur_CameraTranslationThreshold 10000.0
MotionBlur_FullMotionBlur True
MotionBlur_InterpolationDuration 1.0
MotionBlur_MaxVelocity 1.0
RimShader_Color
Member Value
A 1.0
B 0.827726
G 0.585973
R 0.47044
RimShader_InterpolationDuration 1.0
Scene_HighLights
Member Value
X 1.0
Y 1.0
Z 1.0
Scene_InterpolationDuration 1.0
Scene_MidTones
Member Value
X 1.0
Y 1.0
Z 1.0

PPSettingsOverrideStartBlend

Type: float

The start time of the post process override blend

Size

Type: Object.Vector2D

The size of the master viewport subregion allocated to this player. 0-1

ViewportClient

Type: GameViewportClient

The master viewport containing this player's view.

ViewState

Type: pointer{FSceneViewStateInterface}

Modifiers: private, native, const


Structs

CurrentPostProcessVolumeInfo

Modifiers: native

PostProcessVolume.PostProcessSettings LastSettings 
Last pp settings used when blending to the next set of volume values.
PostProcessVolume LastVolumeUsed 
The last post process volume that was applied to the scene
float BlendStartTime 
Time when a new post process volume was set
float LastBlendTime 
Time when the settings blend was last updated.

SynchronizedActorVisibilityHistory

pointer State 
pointer CriticalSection 

Functions

Native functions

DeProject

native final function DeProject (Object.Vector2D RelativeScreenPos, out Object.Vector WorldOrigin, out Object.Vector WorldDirection)

transforms 2D screen coordinates into a 3D world-space origin and direction

Parameters:

  • ScreenPos - relative screen coordinates (0 to 1, relative to this player's viewport region)
  • WorldOrigin - out) - world-space origin vector
  • WorldDirection - out) - world-space direction vector

Note: use the Canvas version where possible as it already has the necessary information, whereas this function must gather it and is therefore slower

GetActorVisibility

native final function bool GetActorVisibility (Actor TestActor) const

Tests the visibility state of an actor in the most recent frame of this player's view to complete rendering.

Parameters:

  • TestActor - The actor to check visibility for.

Returns:

True if the actor was visible in the frame.

GetPostProcessChain

native function PostProcessChain GetPostProcessChain (int InIndex)

Get the PPChain at the given index.

Parameters:

  • InIndex - The index of the chain to retrieve.

Returns:

PostProcessChain The post process chain if found; NULL if not.

InsertPostProcessingChain

native function bool InsertPostProcessingChain (PostProcessChain InChain, int InIndex, bool bInClone)

Add the given post process chain to the chain at the given index.

Parameters:

  • InChain - The post process chain to insert.
  • InIndex - The position to insert the chain in the complete chain. If -1, insert it at the end of the chain.
  • bInClone - If TRUE, create a deep copy of the chains effects before insertion.

Returns:

boolean TRUE if the chain was inserted FALSE if not

RemoveAllPostProcessingChains

native function bool RemoveAllPostProcessingChains ()

Remove all post process chains.

Returns:

boolean TRUE if the chain array was cleared FALSE if not

RemovePostProcessingChain

native function bool RemovePostProcessingChain (int InIndex)

Remove the post process chain at the given index.

Parameters:

  • InIndex - The position to insert the chain in the complete chain.

Returns:

boolean TRUE if the chain was removed FALSE if not

SendSplitJoin

native final function SendSplitJoin ()

sends a splitscreen join command to the server to allow a splitscreen player to connect to the game the client must already be connected to a server for this function to work

Note: this happens automatically for all viewports that exist during the initial server connect so it's only necessary to manually call this for viewports created after that if the join fails (because the server was full, for example) all viewports on this client will be disconnected

SpawnPlayActor

native final function bool SpawnPlayActor (string URL, out string OutError)


TouchPlayerPostProcessChain

native function TouchPlayerPostProcessChain ()

Forces the PlayerPostProcess chain to be rebuilt. This should be called if a PPChain is retrieved using the GetPostProcessChain, and is modified directly.

Events

GetNickname

final event string GetNickname ()

retrieves this player's name/tag from the online subsytem if this function returns a non-empty string, the returned name will replace the "Name" URL parameter passed around in the level loading and connection code, which normally comes from DefaultEngine.ini

GetUniqueNetId

final event OnlineSubsystem.UniqueNetId GetUniqueNetId ()

retrieves this player's unique net ID from the online subsystem

Other instance functions

ClearPostProcessSettingsOverride

simulated function ClearPostProcessSettingsOverride ()

Clear the overriding of the post process settings.

OverridePostProcessSettings

simulated function OverridePostProcessSettings (PostProcessVolume.PostProcessSettings OverrideSettings, float StartBlendTime)

Overrides the current post process settings.

SetControllerId

final function SetControllerId (int NewControllerId)

Changes the ControllerId for this player; if the specified ControllerId is already taken by another player, changes the ControllerId for the other player to the ControllerId currently in use by this player.

Parameters:

  • NewControllerId - the ControllerId to assign to this player.

UpdateOverridePostProcessSettings

simulated function UpdateOverridePostProcessSettings (PostProcessVolume.PostProcessSettings OverrideSettings)

Update the override post process settings