private void _InitInitInfos() { m_initInfos.Clear(); Transform[] joints = m_solver.GetJoints(); for (int i = joints.Length - 2; i >= 0; --i) { Transform tr = joints[i]; TrInitInfo newInitInfo = new TrInitInfo(tr); newInitInfo.ResetInitInfo(); m_initInfos.Add(newInitInfo); } //_InitSolver(); }
public void _RenewInitInfoAndSolver() { _ResetSolver(); for (int i = m_initInfos.Count - 1; i >= 0; --i) { m_initInfos[i].RevertToInitInfo(); } m_initInfos.Clear(); for (int i = m_jointList.Count - 2; i >= 0; i--) { Transform tr = m_jointList[i]; TrInitInfo newInitInfo = new TrInitInfo(tr); newInitInfo.ResetInitInfo(); m_initInfos.Add(newInitInfo); } }
void OnTransformParentChanged() { m_initInfo.ResetInitInfo(); //but, if in a frame after Update, we change the parent AND update the loc transform info... is this still alright? }