Ball Move infinately

Official forum for the Chipmunk2D Physics Library.
Post Reply
shahidpucit
Posts: 7
Joined: Thu Mar 18, 2010 11:55 am
Contact:

Ball Move infinately

Post by shahidpucit »

i am working on a game called Brick Breaker. The Ball in the Game will now stop and bounce forth and back. can anybody explain with an example.

Thank you for your help in advance
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Ball Move infinately

Post by slembcke »

I'm not quite sure what the question is. You want to know how to make the ball bounce?
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
shahidpucit
Posts: 7
Joined: Thu Mar 18, 2010 11:55 am
Contact:

Re: Ball Move infinately

Post by shahidpucit »

i want to make to move the ball infinately means the ball like in game brick breaker. the ball move here and there but does not stop. how i make my ball movement like that.
bollu
Posts: 37
Joined: Tue Sep 14, 2010 4:33 am
Contact:

Re: Ball Move infinately

Post by bollu »

I believe you can do that by setting your ball's friction to 0. I tried it out, and it seems to work. you can change friction by changing cpShape's u[coefficient of friction] member.

Hope this Helps!
~bollu
shahidpucit
Posts: 7
Joined: Thu Mar 18, 2010 11:55 am
Contact:

Re: Ball Move infinately

Post by shahidpucit »

thank you very much. but i set friction of the ball to zero but still it stops. can you send me the sample project to me. i shall be very thankful to you. WHAT YOU SET MASS OF THE BALL AND INERTIA.
My Email address is:SHAHIDLATIF2007@YAHOO.COM PLEASE SEND AS SOON AS POSSIBLE.
shahidpucit
Posts: 7
Joined: Thu Mar 18, 2010 11:55 am
Contact:

Re: Ball Move infinately

Post by shahidpucit »

i have solved this problem. i set the space->damping = 0.0; and the problem is solved.
Thanks who help me to do this
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests