head addon fix

This commit is contained in:
c0ffee 2021-10-23 21:16:17 -07:00
parent 9ad5fd5ea2
commit e8a3c201ac
4 changed files with 2 additions and 3 deletions

View file

@ -171,7 +171,7 @@ namespace Rimworld_Animations {
bodyFacing = anim.headFacing;
angle = anim.headAngle;
quat = Quaternion.AngleAxis(anim.headAngle, Vector3.up);
//pos = anim.getPawnHeadOffset();
pos = anim.getPawnHeadOffset();
}
}

View file

@ -413,7 +413,7 @@ namespace Rimworld_Animations {
public Vector3 getPawnHeadOffset()
{
return Quaternion.AngleAxis(bodyAngle, Vector3.up) * headBob;
return Quaternion.AngleAxis(bodyAngle, Vector3.up) * (pawn.Drawer.renderer.BaseHeadOffsetAt(headFacing) + headBob);
}

View file

@ -71,7 +71,6 @@ namespace Rimworld_Animations {
{
Quaternion addonRotation = Quaternion.AngleAxis(pawnAnimator.headAngle < 0 ? 360 - (360 % pawnAnimator.headAngle) : pawnAnimator.headAngle, Vector3.up);
var pseudoRootLoc = addonRotation * pawn.Drawer.renderer.BaseHeadOffsetAt(pawnAnimator.headFacing);
/*
*
* genital rotation is borked