ios - How to make a view scrollable to view the full scene with sprites with Swift and SpriteKit? -


i have scene fills in view:

scene.size = skview.bounds.size scene.scalemode = .aspectfill

i fill in scene sprites bottom top , in need go further - outside view.

so scene should have same width view height should be... around 3000 fixed.

sprite fill in screen , want scroll able view whole scene.

would please give me advice on how "construct" that?

here quick road map:

  1. in game scene "didmovetoview" want make "world" node. make sure "world" node global variable declaring outside of class. make "world" node size large full size needed (e.g., 3000).
  2. also in "didmovetoview" add pinch gesture allow "zoom" world, using uipinchgesturerecognizer
  3. make function handle pinch. ultimately, "recognizer.scale" should influence "world.scale"
  4. all sprites should added "world" node

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -