Origin point between pixels

0 favourites
  • 6 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • So I just started using Construct 2 and I'm making a game in which there is a turret attached to a body. The sprites I'm using for these objects are uneven, meaning I (seemingly) can't put the origin point in the middle of the sprite. This makes the sprite look weird when rotating, as it doesn't rotate around its center but instead around a point slightly off from the center.

    Is there a way to fix this? It might be really obvious and I'm just being stupid. Any help would be appreciated!

    (Note: I posted this in beginner questions earlier, but we didn't find a solution. So I guess I'm posting it here now.)

  • you can ask the question as many times as you like, it doesn't change the answer... :)

    the base sprite must be one pixel wider so that the rotation point can be in the middle. No one will be able to see the difference - other than the turret rotating better!

    here is a quick test I made to look like your tank:


  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • you can also set Image Points and Origins with decimal places. So if you have a circle sprite that is exactly 17x17 you can set the origin to 8.5 x 8.5 and it will spin "correctly".

    Otherwise if you art is off, then that is an art issue. but you can always change the origin in Construct.

  • Well I suppose there's no solving it unless I change the art.

    Thank you all for your help, it's much appreciated.

  • if you want, you could post a sample capx with just the tank body and turret for me to test. Do you have a lot of different tanks?

  • yeah make a new temp project and copy and paste the art and the spinning code. then post the Google share link here and we can look at it for you.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)