Group Group Group Group Group Group Group Group Group

Zoom, pan around 2D SpriteKkt Map / Tiles

#1

I’m at the point of designing my game and I’m struggling with how to deal with a variable game map, made up from SpriteKit tiles where the user can zoom and pan around at will.

Is this whole grid of tiles inside a uiscrollview or is there another better (easier) way to deal with this problem?

Thanks

#2

Really? No help is almost 3 weeks?

:frowning:

#3

@annemarie1185 Do you still have issues with this?

#4

Yes, I do. I haven’t got my code working to the point where I can implement a plain old scroll view and start putting things in it to test, so I was asking before I went down a dead end, on how best to do this… and as you see, no one offered any help. :frowning:

#5

Hi @annemarie1185, UIScrollView is not going to work for you instead you should use SpriteKit’s camera

With the help of touch events you should be able to move the camera through your map and by scaling your map you’ll be able to mimic zoom

Hope it helps

1 Like
#6

THANK YOU!

Finally an answer! I’ll look at that solution.