Sex props plus quiver visuals

This commit is contained in:
AbstractConcept 2022-10-07 21:52:27 -05:00
parent f275ed90ae
commit 4a2905c7fc
152 changed files with 1985 additions and 184 deletions

View file

@ -5,7 +5,6 @@ using System.Linq;
using System.IO;
using System.Xml.Serialization;
using UnityEngine;
using SFB;
using UnityEngine.UI;
namespace RimWorldAnimationStudio
@ -143,6 +142,8 @@ namespace RimWorldAnimationStudio
if (clip == null)
{ continue; }
bool quiver = isAnimating && Workspace.Instance.GetCurrentOrPreviousKeyframe(actorID).quiver == true;
float clipPercent = (float)(stageTick % clip.duration) / clip.duration;
if (stageTick == clip.duration) clipPercent = 1f;
@ -156,6 +157,8 @@ namespace RimWorldAnimationStudio
Vector3 deltaPos = new Vector3(clip.BodyOffsetX.Evaluate(clipPercent), 0, clip.BodyOffsetZ.Evaluate(clipPercent));
float bodyAngle = clip.BodyAngle.Evaluate(clipPercent);
bodyAngle += quiver ? UnityEngine.Random.value * 2f - 1f : 0f;
float headAngle = clip.HeadAngle.Evaluate(clipPercent);
int bodyFacing = (int)clip.BodyFacing.Evaluate(clipPercent);