1. Hey! Guest! The 34th GMC Jam will take place between August 22nd, 12:00 UTC (Thursday noon) and August 26th, 12:00 UTC (Monday noon). Why not join in! Click here to find out more!
    Dismiss Notice

GMS 2 Character is colliding with nothing?

Discussion in 'Programming' started by Pontereika, Aug 13, 2019.

Tags:
  1. Pontereika

    Pontereika Member

    Joined:
    Aug 13, 2019
    Posts:
    2
    Not sure if this is the right place to post this, but i've just started learning game maker and have run into an issue i have no idea how to fix, my character seems to be offset to the stage and the actual hit box locations of the walls are offset so it looks like they run into nothing or that they pass right through the walls at some points, all the collision is still there its just not lining up with the visual of the walls. has anyone heard of this problem?

    Screen Shot 2019-08-12 at 8.01.24 PM.png this is my character in the actual editor.
    Screen Shot 2019-08-12 at 8.01.35 PM.png this is what it looks like when i start the game.

    my code
    Screen Shot 2019-08-12 at 8.02.28 PM.png Screen Shot 2019-08-12 at 8.02.36 PM.png Screen Shot 2019-08-12 at 8.02.44 PM.png
     
  2. Mert

    Mert Member

    Joined:
    Jul 20, 2016
    Posts:
    360
    This is because your sprite's collision shape. Set your sprite's collision shape as precise
    [​IMG]
     
  3. Pontereika

    Pontereika Member

    Joined:
    Aug 13, 2019
    Posts:
    2
    So this didn't actually solve my problem BUT i did figure it out while doing this! i set it to precise like you said and it didn't work, but then occurred to me that it was switching to a different sprite when the game started cause i was programming a jump animation, so i went to THAT sprite and went to set it to precise when i saw it actually wasn't centered in the middle when my main sprite is, so i centered it and that fix it. Thanks for your advice i didn't even know you could make precise hit-boxes so ill probably use those from now on :D
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice