|
-
Dec 10th, 2002, 10:34 AM
#1
Thread Starter
Addicted Member
Collision Detection
I'm using IntersectRect to detect collisions. I was wondering if anyone whose used this could tell me how you've gone about it. If you detect collision, and then move it if there's no collision, you could end up moving the two sprites over each other, and then they could be "stuck", because it would always say they were collided and never move them again. If you move before you detect, what do you do when they've collided? Do you move it back so they aren't collided any more? What i am doing currently is this:
move sprite
if collision move the opposite direction that it was moved to begin with.
then draw it
Is the proper way to do it?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|