- Documentation
- Client functions
- renderCameraMatrix
Function
renderCameraMatrix
Takes one shot from the given spot (like setCameraRenderMatrix and updateCameraRender at once). The image appears in the texture 1-2 frames later; it also works at 0 shots per second.
Syntax
bool renderCameraMatrix(element camera, float x, y, z, float lx, ly, lz [, float roll = 0, float fov = 70])Arguments
cameraelement- The camera.
x, y, zfloat- Position.
lx, ly, lzfloat- Target.
rollfloat, optional = 0- Roll.
fovfloat, optional = 70- Field of view.
Returns
true on success.
Example
A side photo of the player (a camera without constant refresh).
local photo = createCameraRender(640, 360, 0)
local x, y, z = getElementPosition(localPlayer)
renderCameraMatrix(photo, x + 5, y + 5, z + 3, x, y, z)
See also
createCameraRenderCreates a second camera that renders the world into a texture: a car mirror, CCTV, a screen showing a drone view. Draw the texture withdxDrawImage,dxDrawMaterialLine3Dor pass it to a shader. Size 16-2048 pixels, 0-60 shots per second (0 = only on request withrenderCameraMatrix/updateCameraRender). Every shot is an extra scene render, so it costs performance.updateCameraRenderRequests one camera shot in the next frame (the image is in the texture 1-2 frames later).