1
\$\begingroup\$

I have objects in my game such as clouds and stars. I have given the bounds for them in rectangle format.

The images are not rectangular, although the collision boxes are. How can I implement a collision box that is exactly the shape of my character?

I'm suing overlap2D.

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

If you want to setup a physics data for an object that is already on the screen, just right-click on it and select “Edit Physics” button from drop down menu, this will bring up the “Edit Physics” dialog.

There you can choose if your object is static or dynamic, set its mass, friction, density and so on, and draw the polygon mesh for its fixture shape.

You can also right-click on an asset inside the right panel, and select “Edit Physics”.

If done so, later every time you drop this asset to the stage you will have physics data copied with it. It is also important to notice that physics data is not saved unless you click “Save Physics Data” inside the edit physics dialog. If you just close it, data is lost.

\$\endgroup\$
1
  • \$\begingroup\$ I'm using overlap2d, not box 2d \$\endgroup\$ Commented Jul 11, 2016 at 11:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .