using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Globalization; using System.IO; using System.Xml; using UnityEngine; using Verse; namespace Rimworld_Animations_Patch { public class RubBreasts_FacingEW : HandMotion { public override Vector3 GetHandPosition(Pawn pawn, HandAnimationData handAnimationData, float baseAngle) { Vector3 handPosition = new Vector3(); ActorAnimationData data = pawn.GetAnimationData(); float a = ((float)data.stageTicks % (float)handAnimationData.cycleTime) / (float)handAnimationData.cycleTime * 360f; float m = (data.actorFacing == Rot4.West ? 1f : -1f) * (handAnimationData.mirror ? -1f : 1f); float size = HandAnimationUtility.GetGenitalSize(pawn, "breasts"); handPosition.x = (Mathf.Sin(a / 180f * Mathf.PI) * 0.005f - size * 0.25f) * m; handPosition.z = Mathf.Cos(a / 180f * Mathf.PI) * 0.015f - size * 0.125f; handPosition = handPosition.RotatedBy(baseAngle); return handPosition; } } }