I am using cocos2d-x and box2d. I am detecting collisions with box2d and all seems to go well except one little thing. For some reason when the objects collide they are bouncing off one another. Now I was reading on this a little bit and found that restitution causes this. So I opened up physics editor and set both objects to have a restitution of 0.0. It was still doing it so I researched a bit more and found that have a static/kinematic body would stop this from happening as well so on the one object I was able to do this because it is not applying gravity and such but with the other object I had to leave it as dynamic so that it would apply the gravity to it. So now when it hits the kinematic body stops but the dynamic body is still bouncing off of the other object. It seems to only do it on places where the vertices that it hits at is at an angle. Is there any real way to tell it not to move at all. When this happens it pushes my main character off of the screen.
UPDATE: Ok so maybe I am going about this wrong. I am just trying to learn so I figured a "flappy bird" project would be a good learning experience. So I figured I needed a physics engine so I went with box2d so the bird would fall by itself. Then I am just moving an image of a baseball bat (to the left because the bird is fixed at x=birdheight / 2 and y=screenheight / 2) right now to test collision. On the first go the collision was hitting the square so I looked into how to change the rectangle. In doing so I came across physics editor. So then I updated the images and got a box2d export for the fixtures. So then I redid the bat image from a simple sprite to a box2d body so that I could detect the collision with the new rectangle that is correct. When i first implemented the detection worked good but both objects were being pushed in the direction the screen was scrolling (to the left). So then after some reading I converted the bat image to be a static body which then stopped pushing the bat but the bird still moves. I am only using box2d essentially for making the bird fall by itself and to detect the collision of the rectangle to be more precise than a simple square of the image. Am I completely doing this wrong or is there something I am missing to get the collision detection to stop at the exact location of the intersection?