====== Rotate a point around a center ====== ===== Code ===== // Point to rotate orxVECTOR point = orxVECTOR_0; orxVector_Set(&point,100,-100,0); // Center of rotation orxVECTOR center = orxVECTOR_0; orxVector_Set(¢er,50,-50,0); // New location of point after rotation orxVECTOR result = orxVECTOR_0; // Angle of rotation float angle = 30; // Translate the point back to origin orxVector_Sub(&result, &point, ¢er); // Rotate the point orxVector_2DRotate(&result, &result, angle * orxMATH_KF_DEG_TO_RAD); // Translate back by adding the center orxVector_Add(&result, &result, ¢er);