As the title says, I am having trouble with collision detection and would be very grateful if someone could give me a quick code for collision
Here's something I made a while back to help explain how to do collision detection. Hope it helps a bit!
@MBoffin: Nice little tutorial! Just a suggestion, maybe you should add the term "AABB"/"axis-aligned bounding box" to your itch page there, so people understand that's the collision algorithm they're looking at? They're bound (pun intended) to encounter that term elsewhere while learning.
@tobiasvl Thanks! Yeah, I did think about that, but I opted not to because of who I end up using the tutorial for most. I end up using it quite a lot with younger students, who are also trying to absorb and understand so many other concepts at the same time, so I didn't want to toss in one more thing for them to try to retain and think with.
[Please log in to post a comment]