Skip to main content

Entity::setRotation

Client-side function

JavaScript​

enum eRotationOrder { // Rotation Orders
XYZ = 0,
XZY,
YXZ,
YZX,
ZXY,
ZYX,
MAX,
}

Syntax​

entity.setRotation(pitch, roll, yaw, rotationOrder, p5);

Required Arguments​

  • pitch: float
  • roll: float
  • yaw: float
  • rotationOrder: int
  • deadCheck: Boolean

Return value​

  • void

Example​

const vehicle = mp.vehicles.at(0);
if (!vehicle || !mp.vehicles.exists(vehicle)) return;
vehicle.setRotation(0.0, 0.0, -157.0, 2, true);