From RAGE Multiplayer Wiki
Jump to navigation Jump to search

Attaches your camera to an object.

  • JulioNIB:
    Last param determines if its relative to the Entity


camera.attachTo(entity, xOffset, yOffset, zOffset, isRelative);

Required Arguments

  • entity: Entity handle or object
  • xOffset: float
  • yOffset: float
  • zOffset: float
  • isRelative: Boolean

Return value

  • Undefined


Attaches a camera to a vehicle and sets it as your active camera.

let mainCar ="turismor"), new mp.Vector3(-421.88, 1136.86, 326));"vehCam", () => {
    vehicleCamera.attachTo(mainCar.handle, 0, 0, 2.0, false);
    vehicleCamera.setActive(true);, false, 0, true, false);

See also