Jun 13, 2010 at 4:52 PM
Edited Jun 13, 2010 at 6:54 PM
I have a problem with ContactListener. Why ContactListener call BeginContact ... EndContact when first object hit AABB of other object ?
I have a bullets in my game. When bullet hit wall , I destroy the bullet in ContactListener and create sparks (for fun). But, when wall b2Body have angle PI / 2 (for example) , bullet destroyed when hit AABB of wall , I do destroy process In PreSolve function
How can I solve my problem ?
Demonstation of problem:
BLUE RECT is AABB of wall
ORANGE RECT is wall body
Circle is a bullet
Orange lines is sparks =)
b2Body Rotation is 0f , all works fine (because AABB the same as body vertices)
But, when I rotate body, bullet begin tobe destroyes when hit AABB of wall