So I have a basic chasing script for an enemy but when the enemy is trying to go up a hill it will stop, so I’m trying to lower it’s gravity when going up a hill and up it’s gravity when going down. How would I go about doing this?
if (rb.velocity.y < -0.1)
{
//code goes here for falling
}
if (rb.velocity.y > -0.1)
{
// I think, but I am not sure if the code will work here when you are going up
}