New mod: Better Fingers Tracking

Default muscles values to zero
Embedding of debug symbols
This commit is contained in:
SDraw 2024-03-25 14:18:53 +03:00
parent d6e52feb27
commit 2aaac8f7bd
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
27 changed files with 1457 additions and 36 deletions

59
ml_bft/HandHandler.cs Normal file
View file

@ -0,0 +1,59 @@
using System.Collections.Generic;
using UnityEngine;
namespace ml_bft
{
class HandHandler
{
protected bool m_left = false;
protected List<Transform> m_bones = null;
protected List<Quaternion> m_localRotations = null;
protected Transform m_prefabRoot = null;
protected List<Renderer> m_renderers = null;
protected HandHandler(bool p_left)
{
m_left = p_left;
m_bones = new List<Transform>();
m_localRotations = new List<Quaternion>();
m_renderers = new List<Renderer>();
Settings.ShowHandsChange += this.OnShowHandsChange;
}
public virtual void Cleanup()
{
if(m_prefabRoot != null)
Object.Destroy(m_prefabRoot.gameObject);
m_prefabRoot = null;
m_bones.Clear();
m_localRotations.Clear();
m_renderers.Clear();
Settings.ShowHandsChange -= this.OnShowHandsChange;
}
public virtual void Update()
{
}
public virtual Transform GetSourceForBone(HumanBodyBones p_bone)
{
return default;
}
public virtual void Rebind(Quaternion p_base)
{
}
protected void OnShowHandsChange(bool p_state)
{
foreach(var l_render in m_renderers)
{
if(l_render != null)
l_render.enabled = p_state;
}
}
}
}