Initial commit
This commit is contained in:
19
Assets/Scripts/MoonGravity.cs
Normal file
19
Assets/Scripts/MoonGravity.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class MoonGravity : MonoBehaviour
|
||||
{
|
||||
private Rigidbody _rb;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_rb = GetComponent<Rigidbody>();
|
||||
_rb.useGravity = false;
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
_rb.AddForce(Vector3.down * 1.62f, ForceMode.Acceleration);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user