Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Android Sprite Size Odd?

Author
Message
BitManip
10
Years of Service
User Offline
Joined: 20th Dec 2013
Location: Essex
Posted: 27th Jan 2018 20:42 Edited at: 27th Jan 2018 20:46
Hi All

Thx in A++

I am using the percentage system (2d). I have an arena with a 'wall' sprite down the far right side of the screen created as so:


And also one on the absolute left (x=0.0) created thus:



However, on Desktop & Apple devices these two sprites are the same width. However on my S7 & S8 (Android) The left side is wider visually (almost twice as). I, of course, want them to be identical in width.

What am I doing wrong?

PS: I have tried setting the 'Width' with a fixed Value and on Android the same happens???
I control all the juicy in here!
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 30th Jan 2018 16:09
Is it possible you right 'wall' is wider than 5.209 (100-94.791 which is your x position of the right wall) virtual units and disappearing off the edge of the screen? Try setting the right wall position to:
SetSpritePosition(iUIRightTeeth, 100-getspritewidth(iUIRightTeeth), GetSpriteY(iUITLCorner)+GetSpriteHeight(iUITLCorner) ) instead.

Login to post a reply

Server time is: 2024-04-24 13:05:55
Your offset time is: 2024-04-24 13:05:55