no... maybe i didnt explain myself at the beginning. i dont want the objects to change direction, but to simply stop (vx=0 or vy=0, according to collision direction). and not only stop, but stop the...
Type: Posts; User: david37370
no... maybe i didnt explain myself at the beginning. i dont want the objects to change direction, but to simply stop (vx=0 or vy=0, according to collision direction). and not only stop, but stop the...
thanks for the detailed reply!
i tried the code i posted above, and it determines the collision direction fine, according to the first rectangle.
now, i dont know how to respond to the collision:...
Allrighty now, i made some progress: realised there is the Rectangle.intersects() method! god it is gonna save me so much headache (thought it feels like cheating :D).
so now, i made two rectangles:...
contains is helpful if i am trying to check if there is a rectangle INSIDE an other rectangle, which is not collision detection. you said, "depending on what you have done in the implementation so...
you are right, i should really have thought about it... not spending efficiency of program on such things as checking collision between far objects, thanks.
you didnt answer my question, though: how...
hello.
I am working on a strategy game, and i made a few models of collisions between rectangles in the past but now i need it to be precise and the code to be versatile.
i am not going to show you...