SetObjectPos

From SIMboxWiki
Jump to navigation Jump to search

Description

Use the function SetObjectPos to set a specified object position and orientation (6DOF) in world coordinates.

Syntax

ZS_DECL ZsRET ZSAPI SetObjectPos (

UINT nID,
ZsVec3 vPos,
ZsVec3 vAng
);

Parameters

UINT nID

[in] Handle to object.

zsVec3 vPos

[in] Position vector, specifies the new position in world coordinates.

zsVec3 vAng

[in] Orientation angle vector,specifies the new angles (heading, pitch, roll) in degrees.

Return Value

On success, zsOK (zero) is returned, otherwise an error code is returned.

Remarks

In case any vPos and vAng are NULL, it will be ignored. This way the function can be used to set position only or angle only.