I have a small problem, I’m trying that my ball will always jump the same height, it bounces up and in every platform it jumps less and less, i want it to maintain same height jump, so I’m trying to do that when it collides with a platform it will rigidbody.addfore
but i get this weird error, here’s my script.
void OnCollisionEnter (Collision col){
if (col.gameObject.name == "Platform") {
rigidbody.AddForce(Vector2.up * 6);
}
}
// Update is called once per frame
void Update () {
changeColorMove();
OnCollisionEnter ();
}