Jeremy G Posted April 8, 2019 Share Posted April 8, 2019 I am having a strange issue that only occurs on iOS devices. I am working on a slot machine, and when the reels stop I need to animate the symbols that have landed. The reel symbols are standard images, and to animate them I overlay an animated sprite on top of them (at the same position) and play their animation. This works perfectly fine on desktop and android browsers, but for some reason on iOS the animated sprite seems to be slightly shifted to the left (like 1 pixel or seemingly less...). This also occurs when I use pixi-spine animations, but only on iOS. So far I have tried setting the roundPixels propriety of the renderer to true, but it did not do anything. I have also tried setting the precision of the fragment shader to "highp" but it did not resolve the issue. The game I am working on has not yet be released so unfortunately I cannot include screenshots/code from the project to illustrate my problem. I know this leaves you guys with not much information about the problem, sorry about that. I can provide more details and clarifications if needed. But I am not doing anything out of the ordinary, I am just creating an animation, adding it as a child of my slot machine's reels and then playing it. Since this is iOS specific I was wondering if there was a setting or something that I could try to eliminate the problem. I have even remote debugged my iOs device and when I do a console log of the animated sprite position and of the image position, I get the exact same values as I do on desktop and other devices. Previously I had an issue with "animation wobble" on ios (https://github.com/pixijs/pixi.js/issues/3742) which was solved by setting the fragment shader precision to high, but this is a different issue, it's really a position shift/offset. Also I am using the latest version of pixi. Does anyone have a suggestion I could try? Thanks! ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted April 8, 2019 Share Posted April 8, 2019 What version of PixiJS do you use? I remember that I fixed serious precision problem somewhere in 4.8.3 Jeremy G 1 Quote Link to comment Share on other sites More sharing options...
Jeremy G Posted April 9, 2019 Author Share Posted April 9, 2019 That seemed to have solved the issue, at least with spritesheets. I was using 4.8.1 previously (so not the latest version as I mistakenly said) but 4.8.7 solved it, thanks! I still have a bit of shift with spines but maybe this is another issue, I will try updating pixi-spine to the latest version as well. Quote Link to comment Share on other sites More sharing options...
Jeremy G Posted April 9, 2019 Author Share Posted April 9, 2019 Hmm I might have spoken too soon. I did not see any shift on iPhone in portrait mode but the shift is still there on landscape. On iPad especially there is notable shift in both portrait and landscape. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted April 9, 2019 Share Posted April 9, 2019 heh, so its still a thing. bad As for spine, we have some problems with latest , please report your case if its wrong. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.