I have a Sprite in Andengine. When I use first code below, it's working and displaying on scene and rotating. But when I use sprite's onManageUpdate method for detect collision or for anything else, sprite isn't rotating...
circleBox = new CircleBox(x, y, resourcesManager.circleBoxRegion, 2, vbom);
There is rotate function CircleBox class and is rotating in code above.When I use code below is not rotating why?
circleBox = new CircleBox(x, y, resourcesManager.circleBoxRegion, 2, vbom){
@Override
protected void onManagedUpdate(float pSecondsElapsed)
{
if(player.collidesWith(this)){
player.setCurrentTileIndex(8); // olunce duran adam pozistonuna gelsin
player.getBody().setTransform(new Vector2(100/PhysicsConstants.PIXEL_TO_METER_RATIO_DEFAULT,
400/PhysicsConstants.PIXEL_TO_METER_RATIO_DEFAULT), 0); //1=32
}
}
};