Weird bug with graphics positioning.
matarua
Auckland, New ZealandMember Posts: 854
I have set up a bunch of progress bars and blobs at the end that activate on a certain level.
They all were fine and working perfectly - and aligned by me to the pixel - bar is 4px high located at Y 50px - blob is 10px high located at 50px - all sweet as working and aligned properly.
But I wanted to move them both down - I did this through the scene and layer selector - choosing the many progress bars and blobs for 20 different levels (40 objects) and shift-nudged them all down 10px for layout changes.
So they all sit at 40px now instead of 50px.
But my 10px blob is now too low. So I nudge it up one pixel. It's too high. So I nudge it down one pixel - check position - bang on 40px - sits too low.
I take it in to photoshop for high and low as I see it and yes, it's moving to high and then too low when it moves one pixel.
So I move it to 40.5 and it becomes perfect - when in fact that's wrong - and a hack.
Not sure what to do - I have two colour shifted elements for 10 items and makes 40x changes which with the current interface is painful and time consuming.
Anyone experienced anything like this before? Things do not sit where you tell them to sit on the stage?
They all were fine and working perfectly - and aligned by me to the pixel - bar is 4px high located at Y 50px - blob is 10px high located at 50px - all sweet as working and aligned properly.
But I wanted to move them both down - I did this through the scene and layer selector - choosing the many progress bars and blobs for 20 different levels (40 objects) and shift-nudged them all down 10px for layout changes.
So they all sit at 40px now instead of 50px.
But my 10px blob is now too low. So I nudge it up one pixel. It's too high. So I nudge it down one pixel - check position - bang on 40px - sits too low.
I take it in to photoshop for high and low as I see it and yes, it's moving to high and then too low when it moves one pixel.
So I move it to 40.5 and it becomes perfect - when in fact that's wrong - and a hack.
Not sure what to do - I have two colour shifted elements for 10 items and makes 40x changes which with the current interface is painful and time consuming.
Anyone experienced anything like this before? Things do not sit where you tell them to sit on the stage?
Comments
Yes, I've had this issue on one of my projects, it was a long time ago so I can't remember the solution off the top of my head, but I do know that if you set your actors at 15.1 (rather than 15 or even 15.5) it solves the issue.
I'll try and dig out later the project and see if I can remember anymore about this issue.
Darren.
I think you're right, having movable switched on had something to do with it, if you switch movable off it solves the issue as far as I rememberer, but of course you then are limited with how you can move the actor - as well as effecting collisions.
From here i will also make sure i do this to all non-movable objects - I know that is a good optimisation for performance anyway - but with this added incentive - it seems to be a must do!
Cheers, M@
1 2 3 4 5 [midpoint] 6 7 8 9 10
median of 10 = (the sum of the two closest to the middle value of 10)/2 = (5+6)/2 = 11/2 = 5.5
or the faster way
m = (n + 1)/2
= (10 + 1)/2
= 11/2
= 5.5
or in reverse
n = (2 * m) - 1
= (2 * 5.5) - 1
= 11 - 1
=10
for m = 5, find n
n = (2 * 5) - 1
= 10 - 1
= 9
In any case, I can't tell you exactly how this relates to your case, but it may have something to do with it.
Insightful. >-
It is when it's retina display - that works as such - the stage of every device is an even number - so the center which is how GS works out actor positions has to be able to divide the stage up to four and give the exact center which is not a pixel but the void between four sections.
So the maths that is above thanks to @ericzingeler may be exactly how things are worked out - that's cool to see - and thanks so much for your help guys - I was cursing last night I tell ya!
Forum legends to the rescue Thanks you guys!