- Home /
Sphere through wall - Mini-Golf
I am doing a mini-golf game and when the speed is too high my wall keep going through walls. I tried the (dontgothroughwall) code but it does not work. I tried with the raycast: saying to my ball if you collide with a wall get the normal with the "reflect" and go this way but it still not working out on high speed.
Anyone has a solution to this? I still want to have a realistic physic for the game (bouncyness etc) though.
thanks
What is the maximum speed you can make the ball go without going through the wall?
Answer by Jessy · Jul 17, 2010 at 05:33 PM
Unity 3 potentially provides a solution in the form of Rigidbody.collisionDetectionMode. Have you tried it?
Answer by Yorick · Jul 17, 2010 at 05:39 PM
There are a couple things that you can do that will help.
1: Increase the Physics Timestep (in Time settings)
2: Make the walls thicker (atleast the collider)
3: Make sure the scene is the correct size, or make it bigger then normal.
Answer by Max 1 · Jul 26, 2010 at 05:59 PM
1: Increase the Physics Timestep (in Time settings) .... it worked great since i don't have untiy 3.
Answer by jack 1 · Jul 17, 2010 at 08:50 PM
You might also want to set the wall collider to Smooth and Convex collisions, sometimes it makes it work, sometimes it doesn't, tamper with the settings a little on the collider.
Answer by alexmon27 · Jan 23, 2011 at 02:55 AM
I do have Unity3... I'm so glad I read this because I'm having the same problem. I fixed it by upping the Fixed Time Step (in settings) from 0.02 to 0.01. I did not see any performance drop, although I am running a very simple game, and it fixed the problem entirely. Good luck :)
Your answer
Follow this Question
Related Questions
sphere gets into cube 1 Answer
How to make a wall inpassible 1 Answer
Sphere falls through moving diagonal surface 2 Answers
Camera looking through objects when touching 1 Answer
Sound through wall / Audio zones 2 Answers