SetPosition

Sets the position of the camera in the 3D World. Unlike MovePosition() this method “jumps” to the specified position meaning, it is a little more expansive (performance-wise) than MovePosition(). However, SetPosition() ensures that the terrain block mechanism retrieves more accurate blocks at the new position. Use this method when you want to jump to a new location on the terrain rather than updating the current position (as part of a motion).

 

HRESULT SetPosition(

[in] double X,

[in] double Y,

[in] double Height,

[in] double Yaw,

[in] double Pitch,

[in] double Roll,

[in] double CameraDeltaYaw,

[in] double CameraDeltaPitch,

[in, defaultvalue(0)] long Flags)

Parameters:

Return Values:

The return value obtained from the returned HRESULT can be one of the following:

 

Return value

Meaning

S_OK

Success.

E_FAIL

Catastrophic failure.

TE_E_MPTNOTLOADED

An MPT file must be loaded in TerraExplorer for this method to work.