mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-02 16:36:41 +00:00
Merge branch 'setangleaxis' into 'master'
Fix SetAngle alternative axis order See merge request OpenMW/openmw!4155
This commit is contained in:
commit
ee5ccaa760
1 changed files with 3 additions and 3 deletions
|
@ -168,7 +168,7 @@ namespace MWScript
|
||||||
float az = ptr.getRefData().getPosition().rot[2];
|
float az = ptr.getRefData().getPosition().rot[2];
|
||||||
|
|
||||||
// XYZ axis use the inverse (XYZ) rotation order like vanilla SetAngle.
|
// 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.
|
// UVW axis use the standard (ZYX) rotation order like TESCS/OpenMW-CS and the rest of the game.
|
||||||
if (axis == "x")
|
if (axis == "x")
|
||||||
MWBase::Environment::get().getWorld()->rotateObject(
|
MWBase::Environment::get().getWorld()->rotateObject(
|
||||||
ptr, osg::Vec3f(angle, ay, az), MWBase::RotationFlag_inverseOrder);
|
ptr, osg::Vec3f(angle, ay, az), MWBase::RotationFlag_inverseOrder);
|
||||||
|
@ -181,10 +181,10 @@ namespace MWScript
|
||||||
else if (axis == "u")
|
else if (axis == "u")
|
||||||
MWBase::Environment::get().getWorld()->rotateObject(
|
MWBase::Environment::get().getWorld()->rotateObject(
|
||||||
ptr, osg::Vec3f(angle, ay, az), MWBase::RotationFlag_none);
|
ptr, osg::Vec3f(angle, ay, az), MWBase::RotationFlag_none);
|
||||||
else if (axis == "w")
|
else if (axis == "v")
|
||||||
MWBase::Environment::get().getWorld()->rotateObject(
|
MWBase::Environment::get().getWorld()->rotateObject(
|
||||||
ptr, osg::Vec3f(ax, angle, az), MWBase::RotationFlag_none);
|
ptr, osg::Vec3f(ax, angle, az), MWBase::RotationFlag_none);
|
||||||
else if (axis == "v")
|
else if (axis == "w")
|
||||||
MWBase::Environment::get().getWorld()->rotateObject(
|
MWBase::Environment::get().getWorld()->rotateObject(
|
||||||
ptr, osg::Vec3f(ax, ay, angle), MWBase::RotationFlag_none);
|
ptr, osg::Vec3f(ax, ay, angle), MWBase::RotationFlag_none);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue