AgentUpdate

From Second Life Wiki
Jump to: navigation, search

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 provide/see updated info about the agent's position and velocity! Between receiving agent updates, the sim will continue simulating the agent physically (given the provided control flags) but won't be able to provide the updated position and velocity outside of the physics simulation. 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.