升级obi

This commit is contained in:
2026-01-22 22:08:21 +08:00
parent 120b8cda26
commit 20f14322bc
1067 changed files with 149894 additions and 29583 deletions

View File

@@ -8,13 +8,14 @@ namespace Obi
[Range(0,1)]
public float m;
public void LateUpdate()
public void LateUpdate()
{
if (smoother != null)
if (smoother != null && smoother.actor.isLoaded)
{
var trfm = smoother.actor.solver.transform;
ObiPathFrame section = smoother.GetSectionAt(m);
transform.position = smoother.transform.TransformPoint(section.position);
transform.rotation = smoother.transform.rotation * (Quaternion.LookRotation(section.tangent, section.binormal));
transform.position = trfm.TransformPoint(section.position);
transform.rotation = trfm.rotation * Quaternion.LookRotation(section.tangent, section.binormal);
}
}