I’ve been trying for a while to develop such a game, but the game play is so annoying because of the force that I apply. Here’s my code :
#pragma strict
var bounceForce : float = 10;
function OnCollisionEnter(hit : Collision)
{
if (hit.collider.gameObject.tag == “Sphere”){
print(“Collision”);
hit.rigidbody.AddForce(hit.contacts[0].normal * bounceForce, ForceMode.Impulse);
}
}
The puck ( I think that is how you call it, I’m not English sorry) has the tag “Sphere”. Can anybody give me some hints to use the force properly? Thank you anticipated and if needed, I will make a video showing my problem.