fix: Reduce levitation speed on Theatre
This commit is contained in:
@@ -23310,6 +23310,7 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier: Assembly-CSharp::LevitationManager
|
m_EditorClassIdentifier: Assembly-CSharp::LevitationManager
|
||||||
_levitation: 0
|
_levitation: 0
|
||||||
|
_speed: 0.25
|
||||||
--- !u!4 &1387960518
|
--- !u!4 &1387960518
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@@ -5,8 +5,10 @@ public class LevitationManager : MonoBehaviour
|
|||||||
public static LevitationManager Instance { get; private set; }
|
public static LevitationManager Instance { get; private set; }
|
||||||
|
|
||||||
[SerializeField, Range(0, 1)] private float _levitation;
|
[SerializeField, Range(0, 1)] private float _levitation;
|
||||||
|
[SerializeField] private float _speed = 1;
|
||||||
|
|
||||||
public float Levitation => _levitation;
|
public float Levitation => _levitation;
|
||||||
|
public float Spped => _speed;
|
||||||
|
|
||||||
void OnEnable()
|
void OnEnable()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public class LevitationObject : MonoBehaviour
|
|||||||
_references.Rigidbody.isKinematic = true;
|
_references.Rigidbody.isKinematic = true;
|
||||||
_references.Rigidbody.useGravity = false;
|
_references.Rigidbody.useGravity = false;
|
||||||
|
|
||||||
float t = Time.timeSinceLevelLoad;
|
float t = Time.timeSinceLevelLoad * LevitationManager.Instance.Spped;
|
||||||
t += _settings.Seed * 7.63f;
|
t += _settings.Seed * 7.63f;
|
||||||
|
|
||||||
float cosT0 = Mathf.Cos(t * .3f);
|
float cosT0 = Mathf.Cos(t * .3f);
|
||||||
|
|||||||
Reference in New Issue
Block a user