Function _IrrGetCameraOrientation

au3Irr2

au3Irr2 Function Reference

_IrrGetCameraOrientation

Gets the camera orientation (forward, upward and sideways vectors of the camera)

#Include <au3Irrlicht2.au3>
_IrrGetCameraOrientation($h_Camera, ByRef $a_Vector1, ByRef $a_Vector2, ByRef $a_Vector3)

 

Parameters

$h_Camera Handle of a camera object
$a_Vector1, $a_Vector2, $a_Vector3 Any variables to populate with the camera orientation vectors, must not explicitly be arrays.

 

Return Value

Success: True
Failure: False

 

Remarks

Returned vectors will be different lengths depending on how much the camera is rotated The described camera direction is useful after the camera has been revolved.

 

Related

_IrrGetCameraTarget, _IrrSetCameraTarget, _IrrSetCameraUpAtRightAngle, _IrrSetCameraUpDirection, _IrrGetCameraUpDirection

 

Example


#include "au3Irrlicht2.au3"

; better example welcome :)

_IrrStart()

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

local $aVectForward, $aVectUpward, $aVectSide

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

    _IrrGetCameraOrientation($nodeCamera, $aVectForward, $aVectUpward, $aVectSide)
    _IrrSetWindowCaption('Upward vector: ' & _
        $aVectUpward[0] & ' / Y: ' & $aVectUpward[1] & ' / Z: ' & $aVectUpward[2] )

    _IrrDrawScene()
    _IrrEndScene()
WEND

_IrrStop()