Informs the server of your current state.
None (returns immediately)
The following attributes are changed:
AW_MY_X
AW_MY_Y
AW_MY_Z
AW_MY_YAW
AW_MY_TYPE
AW_MY_GESTURE
AW_MY_PITCH
AW_MY_STATE
An instance must call aw_state_change at least once per world in order to receive any of the following events in that world:
AW_EVENT_AVATAR_ADD
AW_EVENT_AVATAR_CHANGE
AW_EVENT_AVATAR_DELETE
AW_EVENT_CHAT
Calling aw_state_change triggers AW_EVENT_AVATAR_CHANGE events in all other nearby clients that are tracking avatars.
Prior to 3.4, your state changes are only propagated to other clients once per second. Thus, you should not call aw_state_change for a single instance more often than once per second.
Versions 3.4 and later send your state upto 15 times per second.
int yaw;
/* spin on a dime (45 degrees/second) */
for (yaw = 0; !aw_wait (1000); yaw += 450) {
aw_int_set (AW_MY_YAW, yaw);
if (aw_state_change ())
break;
}