rabidus-test/Assets/Amazing Assets/Curved World/Example Scenes/Files/Scripts/GravityModifier.cs

22 lines
411 B
C#
Raw Normal View History

2023-10-02 19:12:35 +03:00
using UnityEngine;
namespace AmazingAssets.CurvedWorld.Example
{
public class GravityModifier : MonoBehaviour
{
public Vector3 gravity = new Vector3(0, -9.8f, 0);
void Start()
{
Physics.gravity = gravity;
}
private void OnDisable()
{
//Restore
Physics.gravity = new Vector3(0, -9.8f, 0);
}
}
}