|
|
|
@ -159,12 +159,20 @@ namespace MWScript
|
|
|
|
|
float ay = ptr.getRefData().getPosition().rot[1];
|
|
|
|
|
float az = ptr.getRefData().getPosition().rot[2];
|
|
|
|
|
|
|
|
|
|
// XYZ axis use the inverse (XYZ) rotation order like vanilla SetAngle.
|
|
|
|
|
// UWV axis use the standard (ZYX) rotation order like TESCS/OpenMW-CS and the rest of the game.
|
|
|
|
|
if (axis == "x")
|
|
|
|
|
MWBase::Environment::get().getWorld()->rotateObject(ptr,angle,ay,az);
|
|
|
|
|
MWBase::Environment::get().getWorld()->rotateObject(ptr,angle,ay,az,MWBase::RotationFlag_inverseOrder);
|
|
|
|
|
else if (axis == "y")
|
|
|
|
|
MWBase::Environment::get().getWorld()->rotateObject(ptr,ax,angle,az);
|
|
|
|
|
MWBase::Environment::get().getWorld()->rotateObject(ptr,ax,angle,az,MWBase::RotationFlag_inverseOrder);
|
|
|
|
|
else if (axis == "z")
|
|
|
|
|
MWBase::Environment::get().getWorld()->rotateObject(ptr,ax,ay,angle);
|
|
|
|
|
MWBase::Environment::get().getWorld()->rotateObject(ptr,ax,ay,angle,MWBase::RotationFlag_inverseOrder);
|
|
|
|
|
else if (axis == "u")
|
|
|
|
|
MWBase::Environment::get().getWorld()->rotateObject(ptr,angle,ay,az,MWBase::RotationFlag_none);
|
|
|
|
|
else if (axis == "w")
|
|
|
|
|
MWBase::Environment::get().getWorld()->rotateObject(ptr,ax,angle,az,MWBase::RotationFlag_none);
|
|
|
|
|
else if (axis == "v")
|
|
|
|
|
MWBase::Environment::get().getWorld()->rotateObject(ptr,ax,ay,angle,MWBase::RotationFlag_none);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|