I want to konw how to define a polygon in jbox2d,especially about how to set the position of a polygon?
I'm a beginer,about polygon defination in jbox2d.
JavaI am using box2D There are different type of shape for box2D among which b2PolygonShape is one.Here in this class you can easily create polygons using set() function which takes array of points and vertex count as parameter.To define position of polygon use myBodyDef.position.Set() function.
Real estate Aventura
Real estate Aventura
Original thread: https://box2d.org/forum/viewtopic.php?t=9219