I have a problem with adding an object to my world when I get a shield powerup. this shield is supposed to appear where the rocket is, but it just appears in random places all over my world
this is my code:
Any ideas of why is this happening?
here is a screenshot of an example of where the shield appears:
http://imgur.com/Cxibtzq
It may seem obvious that I want it just around my rocket, but I say it just in case ;)
public void getPowerUp(){
Actor powerUp = getOneIntersectingObject(PowerUp.class);
if(powerUp != null){
getWorld().addObject(new Shield(), this.getY(), this.getX());
}
}

