this works for the most part, like once i get up to 80 on the y axis my gravity shuts off but there is like an persistent gravity on the rigid body that stays until there is a collision with the ground. and only after that first collision with the ground plane will the gravity be turned off the way I would like it to.
public Rigidbody asteroid;
public Rigidbody player;
void Update () {
if (transform.position.y > 80)
{
GetComponent<Rigidbody>().useGravity = false;
}
}
the asteroids stay up in the air like they are supposed to.
any help with this would be much appreciated.
thanks in advanced.