Computer Science Canada Box Collision Is Sticking |
| Author: | Prince Pwn [ Sun Jan 28, 2007 12:23 pm ] | ||||
| Post subject: | Box Collision Is Sticking | ||||
How could I fix this? Here is my collision detection:
Here's how I draw my boxes, and I move it with a-s-w-d:
Now if I'm against the other box, it sometimes sticks to it. eg: If I press 'd' and go right against the second box, I can't go back left with 'a', but I have to go up or down with 'w' or 's' because it gets stuck. EDIT: Same happens with up or down. Actually I just realized my collision sucks, I'll re-write it. |
|||||
| Author: | CodeMonkey2000 [ Sun Jan 28, 2007 12:47 pm ] | ||
| Post subject: | Re: Box Collision Is Sticking | ||
I think it is because you are missing a coordinate. Try:
|
|||
| Author: | Prince Pwn [ Sun Jan 28, 2007 12:53 pm ] |
| Post subject: | Re: Box Collision Is Sticking |
Ah thanks so much. I'm practicing networking with Turing now that I got a crap computer from the school by moving boxes and having them collide |
|