Author |
Message |
hello
|
Posted: Wed May 07, 2003 6:56 pm Post subject: Collision Detection...Read Tutorial ...confused.. |
|
|
i read the collision detection help
but im confused still
my attempts for collision is having a a boundary like a rectangle
EXAMPLE:
if enemyx>5 and enemy<10 and enemyy>45 and enemyy<55 then
[stuff happens]
end if
but this is a rectangle and most of our ships are not rectangular
so i need to to have a circular boundary or one that is around the picture of the spaceship.
thx thx if u are helping me
and please dont just post a source code please explain it to me |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
Posted: Wed May 07, 2003 7:39 pm Post subject: (No subject) |
|
|
how many times did I say this already?! Scroll down to first reply of the collision detection. It explains circular collision detection
you should read the whole post (like text effects for example... source codes are scattered throughout the disussion because lots of people submit stuff). Same with every other post. Read the whole thread.
if you dont want, use SEARCH (link found on top /\ ) and find posts containing keyword you're looking for |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
William Hui Xue
|
Posted: Thu May 08, 2003 10:33 am Post subject: (No subject) |
|
|
8)
Hello this is William, hi Hang. I am here to sooth your soul and councel you. Please do not feel that everyone is against you. You know that some loves you like your parents and I and our Christian brothers. Do not be bothered with such matter Hang. Instead forgive them, and show your light to the world.
Sincerely William Hui Xue |
|
|
|
|
|
Prince
|
Posted: Thu May 08, 2003 10:37 am Post subject: (No subject) |
|
|
|
|
|
|
|
|
Tony
|
Posted: Thu May 08, 2003 10:38 am Post subject: (No subject) |
|
|
sorry if I appear edgy... its just that it gets annoying when the same question is asked over and over and over again and noone bothers to look up the anwers already posted. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
ThunderChuncky
|
Posted: Thu May 08, 2003 11:53 am Post subject: (No subject) |
|
|
Nobody blames u, tony. <pat on back> |
|
|
|
|
|
naoki
|
Posted: Sat May 10, 2003 2:46 pm Post subject: (No subject) |
|
|
sorry if hello's been on everyone's nerves .... he's just a demanding guy
so obviously he'd be on everyone if his work wasn't progressing well |
|
|
|
|
|
Homer_simpson
|
Posted: Sat May 10, 2003 4:25 pm Post subject: (No subject) |
|
|
hmmm... the guy said that he wanted collision detection for his ship and i dont think his ship is circular so he has to use another way to detect collision... |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
Posted: Sat May 10, 2003 4:39 pm Post subject: (No subject) |
|
|
well you could break the ship down into couple of boxes... would be somewhat accurate |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
naoki
|
Posted: Sat May 10, 2003 5:21 pm Post subject: (No subject) |
|
|
the ship is triangular in shape, and so a circle would at least shave off unnecessary hotspots from the detection system. |
|
|
|
|
|
Homer_simpson
|
Posted: Sat May 10, 2003 5:43 pm Post subject: (No subject) |
|
|
tony wrote: well you could break the ship down into couple of boxes... would be somewhat accurate
yeah that what i was thinking of too... it's a good idea but i dont think boxes would do we could just cut the ship to lines and check it that way... |
|
|
|
|
|
Catalyst
|
Posted: Sun May 11, 2003 12:03 am Post subject: (No subject) |
|
|
theres a way to check if a point is inside a polygon (cant remeber exactly)
that would be an accurate way |
|
|
|
|
|
Homer_simpson
|
Posted: Sun May 11, 2003 10:44 am Post subject: (No subject) |
|
|
that would be the faster way both ways work fine.... |
|
|
|
|
|
hello
|
Posted: Sun May 11, 2003 1:03 pm Post subject: hello |
|
|
we have many ships some are rectangular so thats easy but we want like a basic way to detect if the projectile is hitting the enemy and vice versa also we need to check if the enemy ship is crashing into the main ship |
|
|
|
|
|
Tony
|
Posted: Sun May 11, 2003 1:12 pm Post subject: (No subject) |
|
|
you can consider the projectile to be a dot so you can just check if that dot is inside rectangle/circle/triangle to determine if collision has occured or not.
As for the collision between ships... well its easy to determine that if both are circles. If they're rectangles I think it would be enough to just check if any of the corners of the ship is inside the rectangle of another. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
|