Re: RectMapLayer rotated by default?

35 views
Skip to first unread message

claudio canepa

unread,
Oct 13, 2012, 3:38:33 PM10/13/12
to cocos-...@googlegroups.com


On Sat, Oct 13, 2012 at 3:27 PM, TooMuchPete <pete.h...@gmail.com> wrote:
I'm having some difficulties with RectMapLayer that I'm certain must be caused by something I'm doing, but I can't for the life of me figure out what. Essentially, it looks like RectMapLayer's set_view() is rotated by default. 

Here's the code I'm playing with: http://pastie.org/5053489



In the nested for loops, shouldn't the 1st be on x and the second on y ?

 

TooMuchPete

unread,
Oct 14, 2012, 10:11:35 AM10/14/12
to cocos-...@googlegroups.com
Possibly, but the console is reporting the correct width and height, so it doesn't match up one way or another, right?

TooMuchPete

unread,
Oct 14, 2012, 7:09:38 PM10/14/12
to cocos-...@googlegroups.com
Claudio:
Thanks for your help, you definitely got me thinking about what might be wrong there. I re-wrote those loops to give them a more accurate variable names which made the logic easier for me to wrap my head around.

Essentially I think I had messed up the RectCell() creation and was swapping the x and y there, causing the map to be rendered incorrectly. Here's better code:


Thanks!
Reply all
Reply to author
Forward
0 new messages