pXent_moveglobal ( entity, VECTOR* move, ANGLE* rotate); |
pXent_movelocal ( entity, var shape_number, VECTOR* move, ANGLE* rotate); |
With this functions you can move and rotate a kinematic Actor either global or local.
Parameters: |
entity |
registered Entity pointer (kinematic Actor) |
move |
Vector that moves the entity (adds vector to position) |
rotate |
Vector that rotates the entity (adds vector to rotation) |
shape_number |
the shape number (starts with 0) to move. |
Returns: |
1 if successful, 0 otherwise.
Remarks: |
Only works with kinematic Actors.
You can create a kinematic Actor with pXent_kinematic( entity, 1 ).
pXent_LocalMoveEntity adds the vector parameter to the local position
Speed: |
Fast
VECTOR add_pos; pXent_kinematic( pHook, 1 ); vec_set(add_pos,nullvector); var pHookHeight=pHook.z; while ( pHook.z < pHookHeight+200) { add_pos.z+=1; if(pHook)pXent_moveglobal( pHook, add_pos, nullvector); wait(1); }