Hi Guys, newer Unity member here. I am having a problem with the bounciness of my walls. I’m creating a game that relies on balls bouncing off walls without loosing speed. All the balls bounce in random directions at random speeds, and slow moving balls sometimes do not bounce at all, they kind of just stick there or slide along the wall. The faster moving balls have no trouble bouncing off the walls, and I can’t figure out what’s wrong with the slower ones. Here’s the script I’m using for the balls which goes along with a physics material with 1 bounciness on the walls
#pragma strict
public var speed : float = 100;
function Start ()
{
var direction : Vector2 = Random.insideUnitCircle;
GetComponent.().AddForce(direction * speed);
}
function OnCollisionEnter2D (coll : Collision2D)
{
var vel = GetComponent.().velocity;
Debug.Log (vel);
}
Thanks for any help