LookAt调整

This commit is contained in:
SoulliesOfficial
2025-07-17 04:35:17 -04:00
parent 015a174afc
commit c52a2106db
20 changed files with 23892 additions and 15985 deletions

View File

@@ -51,7 +51,7 @@ namespace Ichni.RhythmGame
{
animationReturnType = FlexibleReturnType.MiddleExecuting;
Vector3 currentPosition = new Vector3(positionX.value, positionY.value, positionZ.value);
targetTransformSubmodule.positionOffset.Add(currentPosition);
targetTransformSubmodule.positionOffset += currentPosition;
targetTransformSubmodule.positionDirtyMark = true;
}
else
@@ -59,7 +59,7 @@ namespace Ichni.RhythmGame
if (!EditorManager.instance.musicPlayer.isPlaying && animationReturnType != FlexibleReturnType.MiddleInterval)
{
Vector3 currentPosition = new Vector3(positionX.value, positionY.value, positionZ.value);
targetTransformSubmodule.positionOffset.Add(currentPosition);
targetTransformSubmodule.positionOffset += currentPosition;
targetTransformSubmodule.positionDirtyMark = true;
}

View File

@@ -43,32 +43,32 @@ namespace Ichni.RhythmGame
{
timeDurationSubmodule = new TimeDurationSubmodule(this);
}
protected override void Update()
{
}
void LateUpdate()
{
UpdateAnimation(EditorManager.instance.songInformation.songTime);
(animatedObject as IHaveTransformSubmodule)?.UpdateLookAt(this);
}
protected override void UpdateAnimation(float songTime)
{
if (lookAtObject == null) return;
enabling.UpdateFlexibleBool(songTime);
targetTransformSubmodule.eulerAnglesOffsetLock = enabling.value;
enabling.UpdateFlexibleBool(EditorManager.instance.songInformation.songTime);
if (!targetTransformSubmodule.eulerAnglesOffsetLock || enabling.value)
{
targetTransformSubmodule.eulerAnglesOffsetLock = enabling.value;
}
if (enabling.value)
{
animationReturnType = FlexibleReturnType.MiddleExecuting;
targetTransformSubmodule.eulerAnglesDirtyMark = true;
gameCamera.UpdateLookAt(this);
}
else if (animationReturnType != FlexibleReturnType.MiddleInterval)
{
animationReturnType = FlexibleReturnType.MiddleInterval;
targetTransformSubmodule.eulerAnglesOffset.Add(Vector3.zero);
targetTransformSubmodule.eulerAnglesDirtyMark = true;
}
}
@@ -86,7 +86,6 @@ namespace Ichni.RhythmGame
}
public void OnDestroy()
{
targetTransformSubmodule.eulerAnglesOffset.Add(Vector3.zero);
targetTransformSubmodule.eulerAnglesDirtyMark = true;
}
}

View File

@@ -51,7 +51,7 @@ namespace Ichni.RhythmGame
{
animationReturnType = FlexibleReturnType.MiddleExecuting;
Vector3 currentScale = new Vector3(scaleX.value, scaleY.value, scaleZ.value);
targetTransformSubmodule.scaleOffset.Add(currentScale);
targetTransformSubmodule.scaleOffset += currentScale;
targetTransformSubmodule.scaleDirtyMark = true;
}
else
@@ -59,7 +59,7 @@ namespace Ichni.RhythmGame
if (!EditorManager.instance.musicPlayer.isPlaying && animationReturnType != FlexibleReturnType.MiddleInterval)
{
Vector3 currentScale = new Vector3(scaleX.value, scaleY.value, scaleZ.value);
targetTransformSubmodule.scaleOffset.Add(currentScale);
targetTransformSubmodule.scaleOffset += currentScale;
targetTransformSubmodule.scaleDirtyMark = true;
}

View File

@@ -50,7 +50,7 @@ namespace Ichni.RhythmGame
{
animationReturnType = FlexibleReturnType.MiddleExecuting;
Vector3 currentEulerAngles = new Vector3(eulerAngleX.value, eulerAngleY.value, eulerAngleZ.value);
targetTransformSubmodule.eulerAnglesOffset.Add(currentEulerAngles);
targetTransformSubmodule.eulerAnglesOffset += currentEulerAngles;
targetTransformSubmodule.eulerAnglesDirtyMark = true;
}
else
@@ -58,7 +58,7 @@ namespace Ichni.RhythmGame
if (!EditorManager.instance.musicPlayer.isPlaying && animationReturnType != FlexibleReturnType.MiddleInterval)
{
Vector3 currentRotation = new Vector3(eulerAngleX.value, eulerAngleY.value, eulerAngleZ.value);
targetTransformSubmodule.eulerAnglesOffset.Add(currentRotation);
targetTransformSubmodule.eulerAnglesOffset += currentRotation;
targetTransformSubmodule.eulerAnglesDirtyMark = true;
}