Sprites collide with tiled background

DJBlufire
Unregistered
 
Post: #16
hmm... I see what you mean now. I know how they'd do it in a 3D engine, but it would be hard to apply the same concept here.
Quote this message in a reply
Jammer
Unregistered
 
Post: #17
Quote:Originally posted by Steven
Jammer: I'll try adapting your code, although I don't understand what the last part's doing.


When you get to that point, you have a collision with 3 values dictating the amount of overlap between the two objects on each of the axis'. What you do, will be up to you.

I have an xyz vector containing an amount to move on each axis, and all that code does is flip the movement direction on one of the axis. Specifically, the one with the least amount of overlap, as that is the one that has just collided.
Quote this message in a reply
Member
Posts: 370
Joined: 2002.04
Post: #18
Then I can't use your code - I can't assume that the closest direction is the one that collided. It's possible to have it the other way around by traveling at a high enough speed. Has anyone played Bolo? That's the kind of thing that I'm trying to do.

Did you ever wonder why we had to run for shelter when the promise of a brave new world unfurled beneath the clear blue sky?
Quote this message in a reply
Post Reply