Hi, I have multiple lines (using setLineStyle etc) in my game that also need to have objects bounce off them. The line is 5 pixels wide and I have sets of coordinates that they are drawn between so the line can be on any angle. The lines also sometime overlap at the end to form a connection but this only needs to be visual (no physics joints)
I have looked but I can't find a b2 physics line (with a width). I see there is a PolygonShape but I would either have to calculate coordinates that surround the line or calculate centers and angle for a surrounding box. At this stage I can't work out how to do either of those.
What is the best way to solve this problem
Thanks
Paul
Comments
There's a little code about your question and I believe, it will be able to help you a little
Likes: antix
[-] Liasoft
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: keszegh