Initial commit

This commit is contained in:
Thorbjoern
2025-05-26 00:46:28 +02:00
commit e5bca03433
3896 changed files with 1434297 additions and 0 deletions
@@ -0,0 +1,45 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Fragilem17.MirrorsAndPortals
{
public class StraightenTrackingSpace : MonoBehaviour
{
public float speed = 1f;
public bool useLateUpdate = true;
public bool useLerp = true;
private void Update()
{
if (!useLateUpdate)
{
Straighten();
}
}
void LateUpdate()
{
if (useLateUpdate)
{
Straighten();
}
}
private void Straighten()
{
Vector3 euler = transform.rotation.eulerAngles;
if (useLerp)
{
transform.rotation = Quaternion.LerpUnclamped(transform.rotation, Quaternion.Euler(0, euler.y, 0), speed * Time.deltaTime);
}
else
{
transform.rotation = Quaternion.Euler(0, euler.y, 0);
}
}
}
}