so im making a top down kart racing game and it is coming along great, but i am using a kind of strange method for collision detection because i am so bad at coding. you see i made a separate picture of the track so that i can make certain areas do something a little different, for example, blue is a blockade, red slows you down, and green is road.
but whenever i load up the game the collision doesn't work at all, the speed will act as if i'm in the gravel on certain parts of the road and acts as if i am touching a wall in other parts and sometime i can just go through walls.
i keep getting out of range pixel when using a certain method for collision detection
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: i keep getting out of range pixel when using a certain method for collision detection
Hello!
The forums don't seem to allow attaching more than one image per post (I've had that myself), but more importantly, it's impossible to know what you're doing wrong without having any code to look into. How about you attach a .love file with the project?
The forums don't seem to allow attaching more than one image per post (I've had that myself), but more importantly, it's impossible to know what you're doing wrong without having any code to look into. How about you attach a .love file with the project?
Re: i keep getting out of range pixel when using a certain method for collision detection
well i did attatch my code but i guess it messed that up
either way i already fixed the issue much later after writing the question, sorry.
for anyone doing this method of collision detection my issue was that the middle of my map was 0,0 and so i just had to subtract half the width and height of the map from the proper vars.
either way i already fixed the issue much later after writing the question, sorry.
for anyone doing this method of collision detection my issue was that the middle of my map was 0,0 and so i just had to subtract half the width and height of the map from the proper vars.
Who is online
Users browsing this forum: Google [Bot] and 12 guests