x
y
z
The position of the entities' or particles' origin in the map coordinate system (in quants).
An entity can be teleported or moved without collision detection by simply changing these values.
Range:
-999999.999 .. +999999.999 (default: set by WED or ent_create)
Type:
var; entity.x can also serve as position VECTOR.
Remarks:
-
For view entities, the position is relative to the camera position and rotates with the camera. Thus, the origin is at camera position, x is the view direction, y is sidewards and z upwards.
-
Due to internal coordinate updates by many functions, don't change entity coordinates more than once per frame.
-
The engine uses a right-handed coordinate system with the Z-axis standing upright, the X-axis pointing to the east, and the Y-axis to the north (RHZUP). Other 3D applications, f.i. DirectX, often use a left-handed coordinate system with the Y-axis standing upright, and Z pointing to the north (LHYUP). For conversion between RHZUP and LHYUP, just swap the Y and Z coordinates.
Example:
action circle()
{
while(1)
{
my.x = cos(my.skill1) * 100;
my.y = sin(my.skill1) * 100;
my.z = sin(my.skill1) * 50;
my.skill1 += time_step;
wait(1);
}
}
See also:
pan, tilt, roll, c_move
► latest version online