top_left top_right
bottom_left
Next Event: Unknown | Forum Rules | QGL Website | Event Registration
openFolder AusForums.com
iconwatfolderLineopenFolder LANs
iconwatfolderLineopenFolder QGL
iconwatfolderLineopenFolder QGL Forum
Author
Topic: 2d collision detection - any help?
Khel
Posts: 10733
Location: Wynnum, Queensland
Well, I figure theres some smart people here, someone may know the answer I need :) I'm basically just looking for a simple way to do collision detection between a circle and a rectangle in 2d. I can do collision detection between two circles, by comparing the sum of their radii with the distance between their centres, and collision between two rectangles is easy enough, but I just can't seem to get my head around how to do collision between a circle and a rectangle.

I tried googling, but most of the stuff that came up was usually way more complicated than what I need, or was about ways of optimising collision detection. I dont really care at this point if its not incredibly optimised, I just want to figure out how to do it first =\
system
--
BoBa
Cainer
Posts: 2064
Location: Brisbane, Queensland
does this help? it's in vb though http://www.rookscape.com/vbgaming/tutBU.php
Persay
Posts: 3433
Location: Brisbane, Queensland
how do you describe your rectangle?
Khel
Posts: 10734
Location: Wynnum, Queensland
Thats perfect, thanks. I guess my google skills just suck.

The shame, to be saved by a VB example :(

last edited by Khel at 21:49:22 15/Oct/05
BoBa
Cainer
Posts: 2066
Location: Brisbane, Queensland
haha pwned by google!
Jim
Posts: 3806
Location: Brisbane, Queensland
if you bought a 4wd you wouldn't give a s*** about what you collided with
Mantra
Posts: 1385
Location: Brisbane, Queensland
The shame, to be saved by a VB example :(
Much roffling at this :)
Obes
Posts: 3734
Location: Brisbane, Queensland
I run into small children with my 4wd ... they fit nicely under the wheels
Obes
Posts: 3735
Location: Brisbane, Queensland
ps. you really must suck at google
seems to list a heap of preferred algorithms for collision detection

I imagine if you plug those names into google you'll get much better results. Pivot2D seems to be popular from the few minutes google work I did.

pps. do your own damn homework!
typo
Posts: 4500
Location: Brisbane, Queensland
run into small children with my 4wd ... they fit nicely under the wheels


They would have to be real small children too fit under there. I mean like asian small ...
Obes
Posts: 3736
Location: Brisbane, Queensland
Its not that I am racists but they are the only ones that fit under there nicely.
AdamtehGreat
Posts: 676
Location: Brisbane, Queensland
if you bought a 4wd you wouldn't give a s*** about what you collided with

That has to be the stupidest post I have seen on QGL to date. Congrats.
Xy
Posts: 329
Location: Mackay, Queensland
Semi-trailer > 4WD
Hardball, Billy
Posts: 4979
Location: Brisbane, Queensland
this thread sucks
system
--
Not a new post since your last visit.
New Post Since your last visit
Back To Forum
Advertise with Us | Privacy Policy | Contact Us
© Copyright 2001-2026 AusGamers Pty Ltd. ACN 093 772 242.
Hosted by Mammoth Networks - Australian VPS Hosting
Web development by Mammoth Media.