- Home /
breakout ball physics
Hello everyone,
I am having trouble getting the desired physics behavior in my breakout-style game, it's close but not quite there. For one I have gotten around the 0 angle problem by rotating the walls slightly and adding a small constant force to the ball directing it down ( please let me know if there is a better way ). I am still however having problems with the ball not bouncing correctly when it hits small horizontal ( ---- ) walls. I have small fence walls (not the boundary walls, though they are made of the same material) throughout some stages and eventually I'll get a weird sliding effect where the ball will hug the fence rather than bounce off it. I believe this is caused by the balls erratic rotation, which brings me to my last problem. The ball does not roll properly it kinda slides across the field. I read that increasing the max angular drag in physics settings would help but it didn't do anything. The core of my game is nearly complete but this stopped me dead in my tracks please help. Thank you.
Answer by roamcel · Jan 04, 2012 at 07:34 AM
I am not familiar with this kind of gameplay, however what I suspect is that your design might suffer from a common misconception: for proper rotation, the ball needs MORE attrition and force, not less.
I'd suggest you significantly increase the ball and surface PHYSIC materials dynamic frictions, so that a lot more force is required for the ball to roll.
Don't have a suggestion for the zero angle issue though, sorry.
Hey thanks a lot. You were right, it took me a while to figure out how exactly. It turned out to be a number of problems. for one I had to ball constricted on the Y position axis so it was not completely falling to the floor ( which created another problem with the ball flying but I remedied that another way ). I had this setup before I had a constant velocity on the ball, before that I was counting on the bounce of the walls and paddle to keep the velocity up, which was obviously wrong way of going about it. So basically I no longer needed to have low friction to keep the ball going at a constant velocity but I didn't think to change it cuz it had been like that for so long. Thanks again.
Thanks for you concern, but as soon as I wrote my reply I tried to up his vote but I got the following message: You don't have permission to do this action. Please Login as another user.
I'm obviously logged in, so I don't know why It says this.
Your answer
Follow this Question
Related Questions
How to punch a ball without loosing its momentum? 3 Answers
How do I use rigidbody's collision detection modes? 2 Answers
Bounce collision vs. constrained rigidbody 2 Answers
Weird Collisions Between Paddle and Ball (Breakout) 0 Answers
Change direction of ball based on where it hits paddle -- 3d breakout game 0 Answers