Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat
Physics for a line - Gideros Forum

Physics for a line

paul_k_clarkpaul_k_clark Member
edited August 2017 in General questions
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



Sign In or Register to comment.