I am quite new with Chipmunk, I am currently having a problem with collisionHandler and callbacks.
I have a simple rectangle 5x10 in which I manually set the angle using cpBodySetAngle() when the user does something, (I update the image base on the body->a variable and it shows up correctly so I assume the angle value is correct.
Say the user turn the rectangle 45 degree, when another object collide with it and the callback event is called, the collision point is not where the object hits.
Hence, ideally I want the collision point to be like at point X in the diagram below
Code: Select all
___
/ /
/__x
But I am getting this
Code: Select all
___
/ /
/__/ x
Appreciate any help.
Thank you
extraz