CameraGetXYZ
This function was added in DSL 10
Description
Returns the current position of the camera and the coordinates it is looking at.
Useful for debugging or placing static cameras with CameraSetXYZ
.
function CameraGetXYZ() --[[ ... ]] end
Parameters
None.
Return Values
posX
:number
- The camera's X position.posY
:number
- The camera's Y position.posZ
:number
- The camera's Z position.lookX
:number
- The X coordinate the camera is looking at.lookY
:number
- The Y coordinate the camera is looking at.lookZ
:number
- The Z coordinate the camera is looking at.
Example
local posX, posY, posZ, lookX, lookY, lookZ = CameraGetXYZ()
print("Camera Position: X=" .. posX .. ", Y=" .. posY .. ", Z=" .. posZ)
print("Camera Look At Position: X=" .. lookX .. ", Y=" .. lookY .. ", Z=" .. lookZ)
See Also
- Game's Native
CameraSetXYZ
- Sets the camera position and its look-at in the game world.