From 344e718212e7602f4baa6aefe26947964158aa27 Mon Sep 17 00:00:00 2001 From: Legonzaur Date: Fri, 13 Jan 2023 18:34:02 +0100 Subject: [PATCH] Fir catalog rotation --- Assets/Catalog.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Catalog.cs b/Assets/Catalog.cs index 1aa9225..65b37b6 100644 --- a/Assets/Catalog.cs +++ b/Assets/Catalog.cs @@ -52,8 +52,8 @@ public class Catalog : MonoBehaviour while (true) { - transform.rotation = Quaternion.RotateTowards(transform.rotation, player.hmdTransform.rotation, 380); - transform.eulerAngles = new Vector3(transform.eulerAngles.x, 0, transform.eulerAngles.z); + transform.rotation = Quaternion.LookRotation(transform.position - player.hmdTransform.position); + transform.rotation = new Quaternion(0, transform.rotation.y, 0, transform.rotation.w); yield return null; } }