Difference between revisions of "AgentUpdate"
(I am NOT typing out the ControlFlags right now. My hands hurt. D:<) |
Chaser Zaks (talk | contribs) (Added control flags) |
||
(One intermediate revision by one other user not shown) | |||
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 | '''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. | ||
Line 67: | Line 67: | ||
| AU_FLAGS_HIDETITLE | | AU_FLAGS_HIDETITLE | ||
| Used to hide group title in nametag. Hides title both locally and for everyone else. | | Used to hide group title in nametag. Hides title both locally and for everyone else. | ||
|} | |||
=== Control Flags values === | |||
{| {{Prettytable}} | |||
|- {{Hl2}} | |||
! Value | |||
! Flag | |||
! Comment | |||
|- | |||
| AGENT_CONTROL_AT_POS | |||
| 0x00000001 | |||
| | |||
|- | |||
| AGENT_CONTROL_AT_NEG | |||
| 0x00000002 | |||
| | |||
|- | |||
| AGENT_CONTROL_LEFT_POS | |||
| 0x00000004 | |||
| | |||
|- | |||
| AGENT_CONTROL_LEFT_NEG | |||
| 0x00000008 | |||
| | |||
|- | |||
| AGENT_CONTROL_UP_POS | |||
| 0x00000010 | |||
| | |||
|- | |||
| AGENT_CONTROL_UP_NEG | |||
| 0x00000020 | |||
| | |||
|- | |||
| AGENT_CONTROL_PITCH_POS | |||
| 0x00000040 | |||
| | |||
|- | |||
| AGENT_CONTROL_PITCH_NEG | |||
| 0x00000080 | |||
| | |||
|- | |||
| AGENT_CONTROL_YAW_POS | |||
| 0x00000100 | |||
| | |||
|- | |||
| AGENT_CONTROL_YAW_NEG | |||
| 0x00000200 | |||
| | |||
|- | |||
| AGENT_CONTROL_FAST_AT | |||
| 0x00000400 | |||
| | |||
|- | |||
| AGENT_CONTROL_FAST_LEFT | |||
| 0x00000800 | |||
| | |||
|- | |||
| AGENT_CONTROL_FAST_UP | |||
| 0x00001000 | |||
| | |||
|- | |||
| AGENT_CONTROL_FLY | |||
| 0x00002000 | |||
| Set while flying | |||
|- | |||
| AGENT_CONTROL_STOP | |||
| 0x00004000 | |||
| Soft freezes the avatar | |||
|- | |||
| AGENT_CONTROL_FINISH_ANIM | |||
| 0x00008000 | |||
| | |||
|- | |||
| AGENT_CONTROL_STAND_UP | |||
| 0x00010000 | |||
| Only sent once to stand up | |||
|- | |||
| AGENT_CONTROL_SIT_ON_GROUND | |||
| 0x00020000 | |||
| Set while sitting on ground | |||
|- | |||
| AGENT_CONTROL_MOUSELOOK | |||
| 0x00040000 | |||
| Set while in mouse look | |||
|- | |||
| AGENT_CONTROL_NUDGE_AT_POS | |||
| 0x00080000 | |||
| | |||
|- | |||
| AGENT_CONTROL_NUDGE_AT_NEG | |||
| 0x00100000 | |||
| | |||
|- | |||
| AGENT_CONTROL_NUDGE_LEFT_POS | |||
| 0x00200000 | |||
| | |||
|- | |||
| AGENT_CONTROL_NUDGE_LEFT_NEG | |||
| 0x00400000 | |||
| | |||
|- | |||
| AGENT_CONTROL_NUDGE_UP_POS | |||
| 0x00800000 | |||
| | |||
|- | |||
| AGENT_CONTROL_NUDGE_UP_NEG | |||
| 0x01000000 | |||
| | |||
|- | |||
| AGENT_CONTROL_TURN_LEFT | |||
| 0x02000000 | |||
| | |||
|- | |||
| AGENT_CONTROL_TURN_RIGHT | |||
| 0x04000000 | |||
| | |||
|- | |||
| AGENT_CONTROL_AWAY | |||
| 0x08000000 | |||
| Set while away | |||
|- | |||
| AGENT_CONTROL_LBUTTON_DOWN | |||
| 0x10000000 | |||
| | |||
|- | |||
| AGENT_CONTROL_LBUTTON_UP | |||
| 0x20000000 | |||
| | |||
|- | |||
| AGENT_CONTROL_ML_LBUTTON_DOWN | |||
| 0x40000000 | |||
| | |||
|- | |||
| AGENT_CONTROL_ML_LBUTTON_UP | |||
| 0x80000000 | |||
| | |||
|} | |} | ||
Latest revision as of 15:17, 14 March 2020
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. |
Control Flags values
Value | Flag | Comment |
---|---|---|
AGENT_CONTROL_AT_POS | 0x00000001 | |
AGENT_CONTROL_AT_NEG | 0x00000002 | |
AGENT_CONTROL_LEFT_POS | 0x00000004 | |
AGENT_CONTROL_LEFT_NEG | 0x00000008 | |
AGENT_CONTROL_UP_POS | 0x00000010 | |
AGENT_CONTROL_UP_NEG | 0x00000020 | |
AGENT_CONTROL_PITCH_POS | 0x00000040 | |
AGENT_CONTROL_PITCH_NEG | 0x00000080 | |
AGENT_CONTROL_YAW_POS | 0x00000100 | |
AGENT_CONTROL_YAW_NEG | 0x00000200 | |
AGENT_CONTROL_FAST_AT | 0x00000400 | |
AGENT_CONTROL_FAST_LEFT | 0x00000800 | |
AGENT_CONTROL_FAST_UP | 0x00001000 | |
AGENT_CONTROL_FLY | 0x00002000 | Set while flying |
AGENT_CONTROL_STOP | 0x00004000 | Soft freezes the avatar |
AGENT_CONTROL_FINISH_ANIM | 0x00008000 | |
AGENT_CONTROL_STAND_UP | 0x00010000 | Only sent once to stand up |
AGENT_CONTROL_SIT_ON_GROUND | 0x00020000 | Set while sitting on ground |
AGENT_CONTROL_MOUSELOOK | 0x00040000 | Set while in mouse look |
AGENT_CONTROL_NUDGE_AT_POS | 0x00080000 | |
AGENT_CONTROL_NUDGE_AT_NEG | 0x00100000 | |
AGENT_CONTROL_NUDGE_LEFT_POS | 0x00200000 | |
AGENT_CONTROL_NUDGE_LEFT_NEG | 0x00400000 | |
AGENT_CONTROL_NUDGE_UP_POS | 0x00800000 | |
AGENT_CONTROL_NUDGE_UP_NEG | 0x01000000 | |
AGENT_CONTROL_TURN_LEFT | 0x02000000 | |
AGENT_CONTROL_TURN_RIGHT | 0x04000000 | |
AGENT_CONTROL_AWAY | 0x08000000 | Set while away |
AGENT_CONTROL_LBUTTON_DOWN | 0x10000000 | |
AGENT_CONTROL_LBUTTON_UP | 0x20000000 | |
AGENT_CONTROL_ML_LBUTTON_DOWN | 0x40000000 | |
AGENT_CONTROL_ML_LBUTTON_UP | 0x80000000 |
Official Client Behavior
Sent UP TO 10 times per second.