problem on adding force in a object

I’m trying to develop a basic carom game… I have carom board mesh and i already set on that a mesh collider. i have some seed or coin and one strike. mesh collider is set on all that objects.

now i need to add force on strike in a direction corresponding to mouse move. then strike should move on the board not to jump. if strike hit on the wodden boundary then it should react with its speed and also should reverse back if force is enough.

i’m trying to using

striker.velocity = 	Vector3.forward * speed;

but its not working as i want. its not reverse back after hiting the boundary box and sometime its jump over the boundary…

I’m very new at unity … so anyone pls help me to solve this problem

184184--6538--$250px_carrom_board_428.jpg

I’m not quite sure from your post whether it’s bouncing over your board or going through it. I’ll take a stab though.

If you are using a mesh collider for your boundaries, whatever object you’re throwing at it could easily pass through if it’s velocity is sufficient to move past the collider in a single frame.

Get rid of your mesh collider, change it to a box collider with a bit of depth in the direction you’re having issues with. In this way, it lessens the likely hood of the object moving past the collider in a single frame, and will result in a nice bounce for your rigidbody.

If your play object is sometimes bouncing over the boundary, then simply create an invisible game object with a box collider and 0 friction material over the play field to restrain such movement.