kashif789us
kashif789us

Reputation: 474

Spritekit - Moving Physics world issue

I am building a tower stacking game. My structure is as follows:

  1. I have a world node which has a physics body attached to it.
  2. I add SKShapeNodes with physics bodies in it and they stack over one another.
  3. When a certain height is reached, I move the worldNode down.

Now here is where the problem occurs. When I move the worldNode down, it disturbs the already placed physics bodies and it makes the tower fall quite number of times.

Coming from a Cocos2D background, I used to move the whole scene there and it did not create any problem there.

Help will be appreciated. Thank you.

Upvotes: 0

Views: 74

Answers (1)

Luca Angeletti
Luca Angeletti

Reputation: 59526

Instead of moving the world node you should move the SKCameraNode into the opposite direction.

Upvotes: 1

Related Questions