Function _IrrGetCameraTarget

au3Irr2

au3Irr2 Function Reference

_IrrGetCameraTarget

Returns array with coordinates of point in space that the camera is looking at.

#Include <au3Irrlicht2.au3>
_IrrGetCameraTarget($h_Camera)

 

Parameters

$h_Camera Handle of a camera object

 

Return Value

success: Array with three elements for X, Y, Z.
failure: False

 

Remarks

None.

 

Related

_IrrSetCameraTarget, _IrrSetCameraUpAtRightAngle, _IrrSetCameraUpDirection, _IrrGetCameraOrientation, _IrrGetCameraUpDirection

 

Example


#include "au3Irrlicht2.au3"

_IrrStart()

_IrrAddTestSceneNode()
local $nodeCamera = _IrrAddFPSCamera()
_IrrSetNodePosition($nodeCamera, 0, 0, -50)

local $aTarget

WHILE _IrrRunning()
    _IrrBeginScene(0, 0, 50)

    $aTarget = _IrrGetCameraTarget($nodeCamera)
    _IrrSetWindowCaption('Targeting: X: ' & int($aTarget[0]) & ' / Y: ' & int($aTarget[1]) & ' / Z: ' & int($aTarget[2]) )

    _IrrDrawScene()
    _IrrEndScene()
WEND

_IrrStop()