|
Reflecting projectiles...
|
I'm working with some projectiles and bouncing them off walls... I'm just having a little problem with it.
Basically, it's easiest to approach it ala Pong. If it hits the wall on it's x axis to flip it's x velocity, and the same for its y velocity. The only problem is that's kind of hard to detect with projectiles. At first I had it when it hit a wall to determine it's 'direction' using getdir and it's velocity, but when dealing with 45° shots, it tends to screw up because it's determining the wrong direction.
Any help here? |
Last edited by DustyPorViva; 04-07-2007 at 02:11 PM..
|