Difference between revisions of "AgentUpdate"

From Second Life Wiki
Jump to navigation Jump to search
(I am NOT typing out the ControlFlags right now. My hands hurt. D:<)
(Updated some info about how this message affects physics simulation)
Line 25: Line 25:
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.)  
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.
'''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.
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.

Revision as of 02:41, 11 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 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.