Having trouble with Bouncing

I’m working on a marble type game just to learn the fundamentals about unity and I’m having a lot of trouble getting the controlled sphere to bounce off the platforms as well as move other objects around.

The scripts attached are: character controller, platform input controller and character motor. It doesn’t have a Rigidbody because whenever I add one the controls seem to become buggy and even with the rigidbody it didn’t bounce :confused:

Any ideas?

If you want it to forcibly bounce, like in a pinball machine, bouncing off of a bouncer

Add a tag to the bouncer “Bouncer” or something.

In your marble script, determine the point of collision and then modify the objects velocity by adding the negative value of the collision point to the object. Hold on, I have a script.

if(thisCollision.gameObject.tag == "Bouncer") //if collides with a bouncer
	{
		var collisionPoint = thisCollision.contacts[0].point; //find the contact point of collision
		rigidbody.velocity = -collisionPoint * Time.deltaTime * MoveSpeed; //set the balls movement to the negative value of the contact point. 
		// this will make it appear asa though it is bouncing away in the exact opposite direction of the collision.

	}