20 lines
375 B
C#
20 lines
375 B
C#
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);
|
|
}
|
|
}
|