Hello, i'm making a Game with random flying objects. When they touch eachother they have to turn 180°.
I got this part working however there is a slight issue. When 2 objects meet for the first time they will both change there dirrection 180°. But when they meet eachother again they will just ignore eachother ea dont do any collision and just float over eachother. IS there any reason why isTouching only works once ?
the code looks as follows:
I know the same result can be achieved by using get one intersecting object than changing those rotations respectively. Just clueless about why isTouching only works once .
private void checkTouching(){
if (isTouching(BigAsteroid.class)){
setRotation((rotation + 180) % 360);
}
