hi, i am doing some work for college and am stuck as to how i detect the edge of the world so i can remove one actor and make another bounce. i would also like some help with that too (the bounce).
thanks


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | if (getX() <= 15 ) { setRotation(getRotation() + 80 ); } if (getY() <= 15 ) { setRotation(getRotation() + 80 ); } if (getX() >= getWorld().getWidth() - 15 ) { setRotation(getRotation() + 80 ); } if (getY() >= getWorld().getHeight() - 15 ) { setRotation(getRotation() + 80 ); } |