Skip to main content

Camera::setCoord

Sets the position of the camera.

Syntax​

camera.setCoord(posX, posY, posZ);

Required Arguments​

  • posX: float
  • posY: float
  • posZ: float

Return value​

  • Undefined

Example​

//Set camera coords to local player position
let {x, y, z} = mp.players.local.position;
let camera = mp.cameras.new('default', new mp.Vector3(-485, 1095.75, 323.85), new mp.Vector3(0,0,0), 40);
camera.setCoord(x, y, z);