Take the 2-minute tour ×  I'm casting a ray in Box2D using
b2World.rayCast how can I get the normal of the wall which was
hit? Or better yet - the line start and end points?  The
information returned is: Fixture (fixture hit, and parent body)
Point ( Location of hit ) Normal (Normal pointing at new
direction of ray - not the normal of the edge hit) Fraction (0.0
- 1.0) of the point location along the array  However lets say I
wanted to place something along the edge hit, previously I just
iterated through the segments and did a line intersection test.
However if the body is rotated this does not work.  How can I
retrieve the line/edge information for the edge the ray hits
with. For example, if i wanted to place texture along the wall
or some kind of decal.  share|improve this question add comment
2 Answers  up vote 3 down vote accepted  Here's what I ended up
doing incase anyone else stumbled onto this. This implementation
will only work on rectangular shapes. Since those are stored in
the same order in the