Jump to content

Adjusting offset and rotation of two bodies


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







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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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