I have a player and must find out if any obstacles are between the player and his target. Basically I would like to send out a "ray" to the target and see if it hits anything on the way.
Right now I am attempting to draw a thin box ("ray") between the player and the target. When I run through all the contacts later I could check for collisions with the ray.
I was wondering if there is any better way to do this in box2D? An aabb query would not have rotation and therefor would not really be a ray. Any suggestions?
Right now I am attempting to draw a thin box ("ray") between the player and the target. When I run through all the contacts later I could check for collisions with the ray.
I was wondering if there is any better way to do this in box2D? An aabb query would not have rotation and therefor would not really be a ray. Any suggestions?