Computer Science Canada collision help |
Author: | Undr_Xposed [ Wed Oct 26, 2005 6:45 pm ] |
Post subject: | collision help |
could someone plz help me understand collision better i only started to learn to about 2 weeks ago and can do very few things i get a bit of it but i want to fully understand it and i looked at the help for it and couldnt really make a whole lot of sense out of it |
Author: | TokenHerbz [ Thu Oct 27, 2005 2:00 am ] | ||||||||
Post subject: | |||||||||
Well it works like this.. Each object has variables which tell it where it is on the map. Now if we have an oval moving, say its chords at at X = 0, and y = 40 This means that the ball is infact on the border of the screen, we can detect this by:
We can also set it for the top, bottom, or right of the screen by knowing how big our picture is, essentially its what you make it...
Above we set the screen to its maximum space, or 300X300 screen, so to see a collistion, we would essentially do...
we ADD the radius so that the outer part of the balls stoped, instead of the bottomleft x/y chords of the ball. When we collide with other obsticles, especially from each and every way, we must cover all the angles. bah im a horrible teacher... i cant really explain it
|
Author: | Undr_Xposed [ Thu Oct 27, 2005 2:46 pm ] |
Post subject: | |
dont worry about beeing the greatest teacher i just need a basic outline that i can follow and learn form and that for the help greatly appriciated 8) |
Author: | Jekate [ Sat Oct 29, 2005 10:15 pm ] | ||
Post subject: | |||
I'm trying to learn this myself again, and was looking around for tuts on it. I'm not fully sure about it yet but it's coming back. I noticed though that when your balls hit, they reverse horizontal direction and vertical which isn't right so I made a guess and fixed it lol.
I made reference to the text that should be taken out. |