C# Class OpenMetaverse.AgentManager.AgentMovement

Agent movement and camera control Agent movement is controlled by setting specific T:AgentManager.ControlFlags After the control flags are set, An AgentUpdate is required to update the simulator of the specified flags This is most easily accomplished by setting one or more of the AgentMovement properties Movement of an avatar is always based on a compass direction, for example AtPos will move the agent from West to East or forward on the X Axis, AtNeg will of course move agent from East to West or backward on the X Axis, LeftPos will be South to North or forward on the Y Axis The Z axis is Up, finer grained control of movements can be done using the Nudge properties
Mostrar archivo Open project: 3di/3di-viewer-rei-libs

Public Properties

Property Type Description
BodyRotation Quaternion
Camera AgentCamera
Flags AgentFlags
HeadRotation Quaternion
State AgentState

Public Methods

Method Description
AgentMovement ( GridClient client ) : System

Default constructor

SendManualUpdate ( AgentManager controlFlags, System.Vector3 position, System.Vector3 forwardAxis, System.Vector3 leftAxis, System.Vector3 upAxis, Quaternion bodyRotation, Quaternion headRotation, float farClip, AgentFlags flags, AgentState state, bool reliable ) : void

Builds an AgentUpdate packet entirely from parameters. This will not touch the state of Self.Movement or Self.Movement.Camera in any way

SendUpdate ( ) : void

Send new AgentUpdate packet to update our current camera position and rotation

SendUpdate ( bool reliable ) : void

Send new AgentUpdate packet to update our current camera position and rotation

SendUpdate ( bool reliable, Simulator simulator ) : void

Send new AgentUpdate packet to update our current camera position and rotation

TurnToward ( System.Vector3 target ) : bool

Rotates the avatar body and camera toward a target position. This will also anchor the camera position on the avatar

UpdateFromHeading ( double heading, bool reliable ) : void

Send an AgentUpdate with the camera set at the current agent position and pointing towards the heading specified

Private Methods

Method Description
GetControlFlag ( ControlFlags flag ) : bool
ResetControlFlags ( ) : void
SetControlFlag ( ControlFlags flag, bool value ) : void
UpdateTimer_Elapsed ( object obj ) : void

Method Details

AgentMovement() public method

Default constructor
public AgentMovement ( GridClient client ) : System
client GridClient
return System

SendManualUpdate() public method

Builds an AgentUpdate packet entirely from parameters. This will not touch the state of Self.Movement or Self.Movement.Camera in any way
public SendManualUpdate ( AgentManager controlFlags, System.Vector3 position, System.Vector3 forwardAxis, System.Vector3 leftAxis, System.Vector3 upAxis, Quaternion bodyRotation, Quaternion headRotation, float farClip, AgentFlags flags, AgentState state, bool reliable ) : void
controlFlags AgentManager
position System.Vector3
forwardAxis System.Vector3
leftAxis System.Vector3
upAxis System.Vector3
bodyRotation Quaternion
headRotation Quaternion
farClip float
flags AgentFlags
state AgentState
reliable bool
return void

SendUpdate() public method

Send new AgentUpdate packet to update our current camera position and rotation
public SendUpdate ( ) : void
return void

SendUpdate() public method

Send new AgentUpdate packet to update our current camera position and rotation
public SendUpdate ( bool reliable ) : void
reliable bool Whether to require server acknowledgement /// of this packet
return void

SendUpdate() public method

Send new AgentUpdate packet to update our current camera position and rotation
public SendUpdate ( bool reliable, Simulator simulator ) : void
reliable bool Whether to require server acknowledgement /// of this packet
simulator Simulator Simulator to send the update to
return void

TurnToward() public method

Rotates the avatar body and camera toward a target position. This will also anchor the camera position on the avatar
public TurnToward ( System.Vector3 target ) : bool
target System.Vector3 Region coordinates to turn toward
return bool

UpdateFromHeading() public method

Send an AgentUpdate with the camera set at the current agent position and pointing towards the heading specified
public UpdateFromHeading ( double heading, bool reliable ) : void
heading double Camera rotation in radians
reliable bool Whether to send the AgentUpdate reliable /// or not
return void

Property Details

BodyRotation public_oe property

public Quaternion BodyRotation
return Quaternion

Camera public_oe property

Agent camera controls
public AgentCamera Camera
return AgentCamera

Flags public_oe property

Currently only used for hiding your group title
public AgentFlags Flags
return AgentFlags

HeadRotation public_oe property

public Quaternion HeadRotation
return Quaternion

State public_oe property

Action state of the avatar, which can currently be typing and editing
public AgentState State
return AgentState