I have a barely noticeable, but annoying and accidental failure, pushing the actor with a movement engine. An actor is just a group with an image. Twing is simply linear to the right of the screen to the left and repeating.
FPS always shows 60.
Any idea?
This is the code:
public class BackgroundScreen extends AbstractScreen { public BackgroundScreen() { stage = new Stage(); stage.setViewport(Properties.VIRTUAL_WIDTH, Properties.VIRTUAL_HEIGHT, false); createRock(); } private void createRock() { rock = new GameElement(atlas.createSprite("obj-stone")); rock.setX(Properties.VIRTUAL_WIDTH); rock.setY(100); float duration=5f; Tween.to(rock, ActorAccessor.POSITION_XY, duration/2).ease(Linear.INOUT).target(-rock.getWidth(), rock.getY()).repeat(Tween.INFINITY, 0).start(Resources.tweenManager); stage.addActor(rock); } @Override public void render(float delta) { Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); Resources.tweenManager.update(delta); stage.act(delta); stage.draw(); } }
UPDATE
This is a link to a YouTube video with an effect. Two considerations:
http://www.youtube.com/watch?v=0pVJbGFciyo
a) When you record a video, glich is more pronounced since you can watch. b) I do not see any glitches in my Galaxy Nexus. c) I did the same animation using only libgdx actions, and the failure is the same d) Somehow it is connected to my PC.
source share