Changing image point effected movement

  • I have a top down grid based game similar to pac man. The player, enemy movement and line of sight is all based on player or enemy x, y. However after I brought the graphics in I changed the image point of everything to 0,0 so the graphics would properly align with the snap to grid function. After changing the image point all of the movement got messed up. For example if I press up the player might go left, If I press left the player might do nothing.

    The reason I changed the image point in the first place was because I wanted my 32x32 tiles to snap within each 32x32 grid square, as opposed to snapping onto the grid crosshairs. Is there a different way of centering my tiles within each grid square that wont effect movement and line of sight? How can I fix this? Thank you for any help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • And changing the image point back solves the problem?

    If it does, maybe just substitute player.x/y with (player.x/y+16) in every function, same for your enemies. This way the values should be the same if the new image point is in the upper left and was in the mid before.

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