GameMaker Studio 2 Desktop

GameMaker Studio 2 Desktop

pixel perfect collision with dnd
I Want to make my player collide with collision boxes but it won't quite do it. it'll collide but always either slightly inside of outside the collision box. does anyone know what dnd actions I need for my player to collide properly?
< >
Showing 1-7 of 7 comments
Blind Jun 6, 2021 @ 6:17am 
yes, when you do a collision check you are, naturally, checking for a collision... but when you do your code you are still in collision. What you have to do is move your guy out of collision. Usually this is done with x = xprevious , y = yprevious but there are other ways as well... that's just the base line
Watermelon power Jun 6, 2021 @ 7:08am 
that teleports my player to another spot on the map somehow
Amir Dayyef Jun 6, 2021 @ 8:59am 
for the collision event add a jump to point action, write 0 and check relative for both boxes.
Watermelon power Jun 6, 2021 @ 9:06am 
0 for both x and y? because that is what I had at first but that does not work as that creates the issue I am trying to solve
Last edited by Watermelon power; Jun 6, 2021 @ 9:08am
Amir Dayyef Jun 6, 2021 @ 10:40am 
if that's the case look into the sprite collision shape.
Watermelon power Jun 6, 2021 @ 10:44am 
that's exactly what i'm looking into now, I've changed the code for movement to a simple if key down > jump to point and that seems to work a lot better with collision. the only problem now is that a few pixels remain between the player and the collision object.
Amir Dayyef Jun 7, 2021 @ 9:37am 
try setting the collision mask of the sprite to precise or precise per frame.
Last edited by Amir Dayyef; Jun 7, 2021 @ 9:38am
< >
Showing 1-7 of 7 comments
Per page: 1530 50