alexandernst Posted March 11, 2018 Share Posted March 11, 2018 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 More sharing options...
alexandernst Posted March 13, 2018 Author Share Posted March 13, 2018 bump? Link to comment Share on other sites More sharing options...
PixelPicoSean Posted March 13, 2018 Share Posted March 13, 2018 Origin of Text by default is set to (0, 0), so it rotates around the top left corner. Link to comment Share on other sites More sharing options...
alexandernst Posted March 13, 2018 Author Share Posted March 13, 2018 @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 More sharing options...
alexandernst Posted March 14, 2018 Author Share Posted March 14, 2018 bump? Link to comment Share on other sites More sharing options...
samme Posted March 15, 2018 Share Posted March 15, 2018 Don't you want origin (0.5, 0.5)? Link to comment Share on other sites More sharing options...
alexandernst Posted March 15, 2018 Author Share Posted March 15, 2018 @samme No. I want the bullets to get rendered from the left/middle, not from the middle/middle. Link to comment Share on other sites More sharing options...
PixelPicoSean Posted March 15, 2018 Share Posted March 15, 2018 Then set the origin to (0, 0.5) Link to comment Share on other sites More sharing options...
alexandernst Posted March 15, 2018 Author Share Posted March 15, 2018 @PixelPicoSean I already did that when I replied to you and I described the problem that I'm getting with that origin. Please reread my reply. Link to comment Share on other sites More sharing options...
Recommended Posts