模型预览

This commit is contained in:
Bob.Song
2025-10-29 11:31:26 +08:00
parent cd6b4ea5c9
commit 5a6c1821aa
4 changed files with 8 additions and 6 deletions

View File

@@ -207,9 +207,8 @@ namespace NBF
{
if (_rotating != Vector3.zero && this.modelRoot != null)
{
Vector3 localRotation = modelRoot.localRotation.eulerAngles;
localRotation += _rotating;
modelRoot.localRotation = Quaternion.Euler(localRotation);
// 使用 Quaternion 来避免欧拉角带来的问题
modelRoot.Rotate(_rotating, Space.World);
}
SetLayer(_root.gameObject, RENDER_LAYER);