Difference between revisions of "AgentUpdate"

From Second Life Wiki
Jump to navigation Jump to search
(added packet ID number as found in message_template.msg)
(I am NOT typing out the ControlFlags right now. My hands hurt. D:<)
Line 23: Line 23:
</pre>
</pre>
==Usage and Notes==
==Usage and Notes==
Regularly sent to inform the simulator of the state of the viewer, such as where the camera is located, how far it can see, what controls are being pressed and the rotation of various parts of the body(torso and head.)
'''It is required that this message be sent on a regular basis for the simulator to keep the agent in position and in a state that it can be collided with by other agents and objects!''' If the agent is moving and this message is no longer sent, the agent continues its current path indefinitely and ignores physical barriers and gravity is no longer applied. This effect stops the moment an AgentUpdate packet is sent again, and the agent is snapped back to the location where the last AgentUpdate packet was sent. Collision events are triggered on objects the ghosted agent collides with, even though they pass through them. This is often seen when a client crashes during a motion.
Far is the distance the viewer can see in meters, it is combined with the viewers FOV to create an interest list on the simulator. Objects outside this distance are not sent to the viewer.
CameraCenter is the location of the camera in region local coordinates.
CameraAtAxis is the X rotational axis of the camera.(Forward)
CameraLeftAxis is the Y rotational axis of the camera.(Left)
CameraUpAxis is the Z rotational axis of the camera.(Up)
=== State values ===
{| {{Prettytable}}
|- {{Hl2}}
! Value
! Flag
! Comment
|-
| 0x04
| AGENT_STATE_TYPING
| The agent is currently playing the typing animation or typing is occurring.
|-
| 0x10
| AGENT_STATE_EDITING
| Agent has the tools window open and objects are selected.
|}
=== Flags values ===
{| {{Prettytable}}
|- {{Hl2}}
! Value
! Flag
! Comment
|-
| 0x00
| AU_FLAGS_NONE
| No flags at all.
|-
| 0x01
| AU_FLAGS_HIDETITLE
| Used to hide group title in nametag. Hides title both locally and for everyone else.
|}
==Official Client Behavior==
Sent UP TO 10 times per second.
[[Category:Messages]]
[[Category:Messages]]
[[Category:Agent Messages]]
[[Category:Agent Messages]]

Revision as of 06:13, 10 July 2008

Message Layout

{
	AgentUpdate High 4 NotTrusted Zerocoded
	{
		AgentData			Single
		{	AgentID			LLUUID	}
		{	SessionID		LLUUID	}
		{	BodyRotation	LLQuaternion	}
		{	HeadRotation	LLQuaternion	}
		{	State			U8	}
		{	CameraCenter	LLVector3	}
		{	CameraAtAxis	LLVector3	}
		{	CameraLeftAxis	LLVector3	}
		{	CameraUpAxis	LLVector3	}
		{	Far				F32	}
		{	ControlFlags	U32	}
		{	Flags			U8	}
	}
}

Usage and Notes

Regularly sent to inform the simulator of the state of the viewer, such as where the camera is located, how far it can see, what controls are being pressed and the rotation of various parts of the body(torso and head.)

It is required that this message be sent on a regular basis for the simulator to keep the agent in position and in a state that it can be collided with by other agents and objects! If the agent is moving and this message is no longer sent, the agent continues its current path indefinitely and ignores physical barriers and gravity is no longer applied. This effect stops the moment an AgentUpdate packet is sent again, and the agent is snapped back to the location where the last AgentUpdate packet was sent. Collision events are triggered on objects the ghosted agent collides with, even though they pass through them. This is often seen when a client crashes during a motion.

Far is the distance the viewer can see in meters, it is combined with the viewers FOV to create an interest list on the simulator. Objects outside this distance are not sent to the viewer.

CameraCenter is the location of the camera in region local coordinates.

CameraAtAxis is the X rotational axis of the camera.(Forward)

CameraLeftAxis is the Y rotational axis of the camera.(Left)

CameraUpAxis is the Z rotational axis of the camera.(Up)

State values

Value Flag Comment
0x04 AGENT_STATE_TYPING The agent is currently playing the typing animation or typing is occurring.
0x10 AGENT_STATE_EDITING Agent has the tools window open and objects are selected.

Flags values

Value Flag Comment
0x00 AU_FLAGS_NONE No flags at all.
0x01 AU_FLAGS_HIDETITLE Used to hide group title in nametag. Hides title both locally and for everyone else.

Official Client Behavior

Sent UP TO 10 times per second.