Hi!
I’m trying to move a Sprite using Tweens, and it looks fine on my PC, but when I try it on mobile via browser, the animation is glitched.
Video and sprites here: https://imgur.com/a/ZU063gO
What could be causing this?
This is my config file:
type: Phaser.AUTO,
parent: 'content',
width: SCREEN_WIDTH,
height: SCREEN_HEIGHT,
scale: {
mode: Phaser.Scale.FIT,
autoCenter: Phaser.Scale.CENTER_BOTH,
},
autoRound: false,
pixelArt: true,
Thank you
samme
2
What is the tweening code?
samme
3
Oh nvm, you mean the the sprite texture appearance.
I’m using rexPathFollower
plugin, here is the code:
moveHeroThroughPath = (path) => {
const pathFollowerPlugin = this.scene.plugins.get('rexPathFollower');
const pathFollower = pathFollowerPlugin.add(this, { path });
this.scene.tweens.add({
targets: pathFollower,
t: 1,
ease: 'Linear', // 'Cubic', 'Elastic', 'Bounce', 'Back'
duration: path.getPathLength() * 10,
repeat: 0,
yoyo: false,
onComplete: (tween, target) => {
this.setAnimation('idle');
path.destroy();
},
});
};
samme
5
The problem is the pirate’s right eye looks askew etc.?
You could try autoRound: true
.