mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-26 17:02:53 +08:00
Fix for MLO Instance rotations
This commit is contained in:
parent
4834b8c520
commit
96a561798c
@ -1488,16 +1488,23 @@ namespace CodeWalker.GameFiles
|
|||||||
_CEntityDef.rotation = inv.ToVector4();
|
_CEntityDef.rotation = inv.ToVector4();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
Orientation = inverse ? Quaternion.Normalize(Quaternion.Invert(ori)) : ori;
|
||||||
|
if (MloInstance != null)
|
||||||
|
{
|
||||||
|
_CEntityDef.rotation = Orientation.ToVector4();
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
Quaternion inv = inverse ? ori : Quaternion.Normalize(Quaternion.Invert(ori));
|
Quaternion inv = inverse ? ori : Quaternion.Normalize(Quaternion.Invert(ori));
|
||||||
ori = inverse ? Quaternion.Normalize(Quaternion.Invert(ori)) : ori;
|
|
||||||
Orientation = ori;
|
|
||||||
_CEntityDef.rotation = inv.ToVector4();
|
_CEntityDef.rotation = inv.ToVector4();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (MloInstance != null)
|
if (MloInstance != null)
|
||||||
{
|
{
|
||||||
MloInstance.SetOrientation(ori);
|
MloInstance.SetOrientation(ori);
|
||||||
|
MloInstance.UpdateEntities();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Archetype != null)
|
if (Archetype != null)
|
||||||
|
@ -408,7 +408,8 @@ namespace CodeWalker.Project.Panels
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CurrentEntity.SetOrientation(q, true);
|
bool useInverse = (CurrentEntity.MloInstance == null);
|
||||||
|
CurrentEntity.SetOrientation(q, useInverse);
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectItemChanged();
|
ProjectItemChanged();
|
||||||
|
Loading…
Reference in New Issue
Block a user