Answers for "unity 3d rigidbody gravity"

C#
1

unity 3d rigidbody gravity

private Rigidbody rb;

void Start()
{
    rb = GetComponent<Rigidbody>();
}

void FixedUpdate()
{
    rb.AddForce(Physics.gravity * rb.mass);
}
Posted by: Guest on September-01-2021

C# Answers by Framework

Browse Popular Code Answers by Language