增加第一人称相机平滑 Y 轴模式

This commit is contained in:
chinosk
2024-06-05 18:58:24 +08:00
parent d7ff38b3f0
commit 37e98f61a0
3 changed files with 12 additions and 5 deletions

View File

@@ -164,7 +164,10 @@ namespace GakumasLocal::HookMain {
*value = cacheRotation;
}
else {
lookat_injected(_this, &cacheLookAt, &worldUp);
static GakumasLocal::Misc::FixedSizeQueue<float> recordsY(60);
const auto newY = GKCamera::CheckNewY(cacheLookAt, true, recordsY);
UnityResolve::UnityType::Vector3 newCacheLookAt{cacheLookAt.x, newY, cacheLookAt.z};
lookat_injected(_this, &newCacheLookAt, &worldUp);
return;
}
}