Jump to content
  • Advertisement
Sign in to follow this  
SonicD007

Question about swept collisions

This topic is 3674 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was taking a look at swept collisions because I'm trying to use it for collision testing in my ping pong game, but it looks very confusing. I was wondering if something like this would be taught in a math class or physics class and if so when that class would be taken. (like highschool/college) Here is the link I was looking at about swept collisions http://www.harveycartel.org/metanet/tutorials/tutorialA.html Also, I can't see the code to it because it is flash code and I don't have any programs that can read the file correctly. Anyway I can read the file? Also if anyone would like to explain the basic idea of how swept collision works I would appreciate it. So far what I'm thinking is that it tests the height and width of both objects to see if they collide on the x and y axis of the window, and perform another test to check if the bottom left and top right corners of the object intersect which will tell if the objects have collided. Still not sure how the circular objects work, but I think I understand the square to square collisions. Correct me if I'm wrong though :) Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Intersection testing as it applies to games won't be covered in any general math or physics class you might take. Fortunately though, there are plenty of other references available.

In fact, I think swept AABB vs. AABB intersection testing is covered in one of the articles in the GDNet 'articles' section (or at least it was at one time). There's even an example implementation :)

Share this post


Link to post
Share on other sites
unless your paddles are rather large and slow moving, and the comera is zoomed in, you might simply ues a rectangle around the paddle, if you use two rects in a weird squat cross, you'd further minimize the area covered of rect vrs round.

Im sure its possible to check with a paddle shaped detection area, but the time it would take to generate its dimensions vrs rects seems like it would take a bunch longer

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!