GameObject object; // set object's position, rotation, pitch and yaw object.SetPosition(10, 0, 5); object.SetRotation(90); // rotates 90 degrees along the y-axis object.SetPitch(10); // tilts the object 10 degrees object.SetYaw(20); // turns the object 20 degrees // get the object's orientation Vector3 orientation = object.GetOrientation();
GameObject object; Quaternion orientation; // set object's orientation using a quaternion orientation = Quaternion::FromEulerAngles(0, 90, 0); // rotates 90 degrees along the y-axis object.SetOrientation(orientation); // get the object's orientation orientation = object.GetOrientation();In these examples, the package/library used is not explicitly stated, but it likely belongs to a game engine or framework, such as Unity or Unreal Engine.