AW AVATAR Z
Minimum requirements | ||
---|---|---|
Added in version 2.1 | ||
SDK | build 13 |
AW_AVATAR_Z
Type
Integer
Description
Z coordinate of a users avatar.
Notes
This is the value set for AW_MY_Z when the user called aw_state_change. It specifies the avatar's position along the north/south axis, with north being positive.
For SDK build 27, world build 44, browser build 430; and later: It is also used by aw_avatar_set to force users into changing their avatar position.
Range
Minimum: | -2147483648 centimeters (furthest south) |
Maximum: | 2147483647 centimeters (furthest north) |
Usage
#include <math.h> void handle_avatar_change (void) { int x = aw_int (AW_AVATAR_X); int y = aw_int (AW_AVATAR_Y); int z = aw_int (AW_AVATAR_Z); printf ("%s has moved to (%d, %d, %d); coordinates: %.2f%c %.2f%c %.2fa\n", aw_string (AW_AVATAR_NAME), x, y, z, fabs ((float)z) / 1000, z >= 0 ? 'N' : 'S', fabs ((float)x) / 1000, x >= 0 ? 'W' : 'E', (float)y / 1000); } aw_event_set (AW_EVENT_AVATAR_CHANGE, handle_avatar_change);