- Home /
I have a sphere and a mesh (roulette table). Physics doesn't work.
As in the title. I made a video about it! No matter what i do (i tryed messing with the frictions, bounciness, drag and so on) the ball bounces forever. The end result is for it to behave like a roulette table if it wasn't obvious. Any ideas anyone? https://www.youtube.com/watch?v=dsJzqgXqd_s
Someone could probably figure it out quickly if you were willing to put a unitypackage on the net. You might try going to:
Edit > Project Settings > Physics
And setting '$$anonymous$$in Penetration for Penalty' to 0.0
Answer by MrSoad · Dec 06, 2014 at 06:22 PM
Ok give this a try. I've increased your scale by 50. I've added the Mouse Orbit script to your Camera and fixed it's view so you can see the roulette table in the Game View. I've added physical materials to your ball and wheel, and a bit of drag to your ball to make it stop.
You will want to build your wheel out of primitive colliders if you want to spin(move) it later. Mesh colliders are not for moving unless set to convex(and convex will not suit the roulette wheel). Use multiple Box colliders as children of one root object(this must have the rigidbody on it, none of the children should!). Hope this helps to get you started, let me know if you have any problems un-zipping at your end.
https://www.dropbox.com/s/rzvvshk8zwv2woi/New%20Unity%20Project%206%20%282%29.rar?dl=0
Ok, thank you! This should get me going. Scale was the only thing i haven't thought of. If you ever need help with any native iOS objective-C or cocos2D drop me a bump so i can return the favor! I have recently migrated from that enviroment! All the best to you mate.
No problem, thanks bratila :) Don't forget to accept my answer too :D
Answer by thepenguinmaster · Dec 06, 2014 at 02:49 AM
Is there any bounce on either phsysics material? It seems like it is bouncing from a poorly configured phsysics material. We woudl need to see code and configuration to know for sure. Do you have any scripts that add force to the ball? If you add force, you need to keep in consideration that the ball is rotating, and what was forward force on the ball. may be up, or even backwards. If that is the case, you may need to nest gameobjects and keep the parent from rotating, while the child (ball) rolls.
there are no scripts, i tryed doing physics materials or use the default one. It is just a mesh for the table and a sferical colider for the ball. The ball has a rigid body attached to it. I have placed the project here, but it waits for approuval from the moderators.
https://dl.dropboxusercontent.com/u/94746300/New%20Unity%20Project%206.zip i hope it get's posted this time
Thanks, I will have a quick look at it for you.
You working on a $$anonymous$$AC ? A lot of files did not unzip on my PC...
yes, i am working on a mac. ican RAR the project, give me a second.