So Close, But Yet So Far

I finally have my ball on the canvas. Unfortunately, it is not behaving well at all. Ideally right now it should just sit there because I have defined gravity as:

b2Vec2(0.0, 0.0)

But for some reason, the y-value is changing. To add weirdness to it, the y-value changes differently for different starting y positions. I think it has something to do with my “ground” bounding box. Time to do a little exploring.

Update: It was a problem with my ground bounding box. My ball was inside the box. Turning the ground into a “wall” and placing the ball outside of it fixed the problem.

Update update: I now have a bouncing ball! This might actually work now!

Leave a Reply

Your email address will not be published. Required fields are marked *