[103] anchor broken in crop mode?

Bugs will be moved here once resolved.

Post » Sun Sep 16, 2012 7:34 pm

With crop mode, if you want to anchor a sprite to say the top and have it centered, you set the "left edge" to "window left" and "right edge" to "window right".

Heres a one sprite capx:

https://www.dropbox.com/s/bh6pinkzyr3c6s2/broken_anchor_103.capx

Except in 103 it doesn't seem to work in FF and IE - as you resize the window, the left edge jumps around and is generally too far left, and sometimes the entire sprite disappears (and then its gone until you refresh the page), and sometimes it wraps, and sometimes it even produce two half height sprites!

Id seems pretty broken - or I'm doing something pretty stupid!

I also tried it with webgl switched off - didn't help. Ive even updated my graphics driver to one issued about 2 weeks ago from nvidia.

Some screen shots (the box should be centered on the screen with the same gap on the left and right hand sides.

https://www.dropbox.com/s/9jdehk5yu9jsd06/anchor1.PNG

https://www.dropbox.com/s/hduoucz5yzbgnya/anchor2.PNGnutmix2012-09-17 14:49:52
B
15
S
5
G
2
Posts: 357
Reputation: 3,691

Post » Mon Sep 17, 2012 2:32 pm

.capx link is 404, did you make it public?
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,574

Post » Mon Sep 17, 2012 2:46 pm

Thats odd, I just right clicked on the file in explorer, then did dropbox->get link. Here it is again:

https://www.dropbox.com/s/bh6pinkzyr3c6s2/broken_anchor_103.capx


B
15
S
5
G
2
Posts: 357
Reputation: 3,691

Post » Mon Sep 17, 2012 2:49 pm

Ah, I see the problem, the first link has a space at the end. This should not matter, but seems to. Have fixed it.nutmix2012-09-17 14:50:21
B
15
S
5
G
2
Posts: 357
Reputation: 3,691

Post » Mon Sep 17, 2012 5:06 pm

Ah, looks like Anchor requires a top-left origin. Workaround is just to set the origin to top left in the mean time. I'll try to have it fixed for the next build.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,574

Post » Mon Sep 17, 2012 10:09 pm

Ahhh, ic, I can fix it by using a top left origin. Nice.

Is there any way to us anchors to anchor an object without stretching it? E.g. not anchor it to left or right, only say bottom? I.e. not anchor it to a corner, but a side?

E.g. if you want a button to stay at the bottom in the middle, but you dont want it to stretch (which is what happens if you anchor it to left and right). E.g. if you could say NONE in the "left edge", "top edge" "right edge" and only have "Bottom edge" set to window bottom: the system would keep the objects ratio to left and right edges (so if it was bang in the horizontal center, it would keep 50% on the left, and 50% on the right).

I have to simulate this currently by repositioning the object on every tick.

Thanks for your help!nutmix2012-09-17 22:18:16
B
15
S
5
G
2
Posts: 357
Reputation: 3,691


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest