Jump to content

Adjusting offset and rotation of two bodies


alexandernst
 Share

Recommended Posts

I have a "Gun" object and a "Bullet" object, and I'm trying to adjust the offset at which the bullet should start from the gun, but I'm getting an unexpected margin which I can't find where it's getting from.

This extra margin/distance happens when I fire the gun to the right or down, but it converts into a negative margin/distance when I shoot to the left or up.

The second problem is that the text "pium pium" get's horizontally/vertically out of it's body depending of the angle.

Here is a demo of the problem: http://plnkr.co/edit/dOLK0j1qOEphv2nLLJKE?p=preview

Plunker.png.4570135718c7cf105a460d0c1d48f701.png

Plunker.png.2435016cd7647c3f35799e74923d6317.png

Plunker.png.f15feb418cafb672c53a0e0de9e0c341.png

Plunker.png.375ee53026c76295ac12342072d2dbcf.png

 

 

Link to comment
Share on other sites

@PixelPicoSean Setting origin to (0, 0,5) (left center) doesn't solve the issue entirely. Now the text is aligned with the physics body when shooting left or right, but not up or down. Also, shooting to the right will still leave a small margin, and shooting to the left will leave that same margin, but negative. Demo: http://plnkr.co/edit/icXSBM7HnqWmud9iG11l?p=preview

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...