trouble understanding chipmunk's coordinate system
Posted: Sun Mar 15, 2015 8:51 pm
Hi,
I'm learning to use chipmunk and SDL together and I'm having some trouble to understand what is going on. I've been reading some tutorials online and wrote a little program to give it a try. I know that SDL and chipmunk coordinates are different and I'm struggling a bit with this. I want to create an object that will fall to the ground and then stop after bouncing a little. However, the object seems to be always offset, thus falling out of the screen bottom. Besides, when the object falls on the ground, it seems to slide a bit from side to side before coming to a rest.
I attached the code for reference (warning, it's ugly code ).
Best regards.
I'm learning to use chipmunk and SDL together and I'm having some trouble to understand what is going on. I've been reading some tutorials online and wrote a little program to give it a try. I know that SDL and chipmunk coordinates are different and I'm struggling a bit with this. I want to create an object that will fall to the ground and then stop after bouncing a little. However, the object seems to be always offset, thus falling out of the screen bottom. Besides, when the object falls on the ground, it seems to slide a bit from side to side before coming to a rest.
I attached the code for reference (warning, it's ugly code ).
Best regards.