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
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);
}