Collision Engine


beherit

Still Fresh
Joined
Mar 17, 2005
Messages
7
is there any way to make a process that rebounds a surface at the correct angle of refraction relative to the angle of the side that its colliding with...or if its a circle, the tangent of the point at which it strikes?
(hope i made that make sense)
 
???

I didn`t really understand it but I if you mean, like shooting a laser at a mirror and it is getting reflected in the same angle it comes onto the laser (I hope THAT made sense), it`s the principle of "Angle of incidence = Angle of reflection".

It should be doable, if you give me some time, I should come to a mathematical solution for this in Fenix. (my physics and maths courses are some years ago already :D)


Edit:

Damn, I just had angles in my head, tried so much stuff, but if you just reverse the x speed (when hitting something sideways) or y speed (when hitting something from above or below) of your object, it should do the job.


I was thinking and trying with angle, get_angle and get_disty commands, but thats far too complicated for me now....


Don`t know about the circle, perhaps just some "ifs" if your object is left/right/above/below the circle...



Moogle, say something :D
 
Back
Top