rkr wrote...
so if the bullet collides with the enemy
i should set the location of the enemy by using the bullet rotation
how should i do that?
is there any trigonometry involved// in action code in class of enemy
Actor bullet = getOneIntersectingObject(Bullet.class);
if (bullet != null)
{
int rotation = getRotation(); // save current rotation of enemy
setRotation(bullet.getRotation()); // set rotation to that of bullet
move(3); // getting pushed back
setRotation(rotation); // set rotation back to what it was
}
