Is gravity affect the gameobject moving speed?

I have made the player and the enemy, and made the enemy chasing the player, both are using gravity and the same code:
transform.Translate(Vector3.forward * 5F * Time.deltaTime);

But when the enemy chasing the player, at start they can keep the distance, but after a period of time, the enemy will come closer and closer the player, and I try it without gravity, then it can keep the distance, But I need to use gravity.
So I want to ask is the gravity affect the movement between the gameobject? If so, can it be solve this problem?

thank you,
Sorry for my bad english, hope you guys can understand.

Are the player and enemy falling in freespace or are they on some sort ground?

On the same ground.

1 Answer

1

Yes the gravity affect’s the speed because your object has a mass propertie, more mass more gravity work, so your object will slow down.

oh , thx very much, so is it increase the enemy' s mass can solve the problem?

What...? How does mass and gravity affect a transform.Translate function...?

@Bluntweapon Before vote down, read the documentation the rigidbody interacts with the gravity using or not the transform.Translate and the user said that he needs to use gravity. i NEVER said that the gravity affects the function transform ...

OK Fair enough, I assumed his transform was pointing in a perpendicular direction to gravity, which he never did state. I shall rescind my statement. Can't cancel the negative vote anymore (damn it) though, so my apologies.