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.
-999999.999 .. +999999.999 (default: set by WED or ent_create)
var; entity.x can also serve as position VECTOR.
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.
- 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.
For maintaining collision detection, move an entity with c_move instead of displacing it directly by changing its coordinates. After displacing an entity, it is not properly detected at its new position until the end of the frame when the collision tree is updated.
Updating the collision tree earlier can be enforced by calling c_updatehull. Due to internal coordinate updates by many functions, don't change coordinates of an entity more than once per frame.
my.x = cos(my.skill1) * 100;
my.y = sin(my.skill1) * 100;
my.z = sin(my.skill1) * 50;
my.skill1 += time_step;
pan, tilt, roll, c_move
► latest version online