Hello.
I'm toying around with this wonderful library. It's my first time using physics engine, it's a lot of fun, but now i need an hand of help =).
I've set-upped a simulation space to act as a simple "pong"-like game (yes, yet anoter one =) ).
One thing that i think it's important: i've normalized my space between [-1, +1] in both axes, and i'm using floats as the chipmunk datatype.
In this example of mine the paddles can move forward to hit the ball, they automatically follow the ball Y position in my timer tick via cpBodySlew.
The ball is attracted to the side of the screen by modifying the gravity with a custom velocity function, like showed in the Planet example.
The issue i'm having is, there are cases in which the ball is being attracted to the side of the screen, the paddle does its "swing" motion, which is to apply an impulse to the paddle, but the ball does not get hit.
I've managed to take a sample movie of that (sorry for the software watermark) http://b1.s3.p.quickshareit.com/files/c ... se8a81.mov
(The number shown under the paddle is the number of frames in which the paddle is colliding with the ball)
Can this be a rounding error caused by the -1 +1 normalization? Or my ways of applying forces are simply wrong?
collision weirdness
Who is online
Users browsing this forum: No registered users and 8 guests