alexandernst

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

Plunker.png.4570135718c7cf105a460d0c1d48f701.png

Plunker.png.2435016cd7647c3f35799e74923d6317.png

Plunker.png.f15feb418cafb672c53a0e0de9e0c341.png

Plunker.png.375ee53026c76295ac12342072d2dbcf.png

 

 

Share this post


Link to post
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

Share this post


Link to post
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.

Guest
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.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.