1
votes

As the title suggests, is their a way to reverse gravity in iOS? By this i mean intead of an object falling at a set velocity, it will rise?

I am using xCode and iOS SpriteKit

1

1 Answers

6
votes

Sure - you can set the gravity property of your physicsWorld to a vector pointing up. For example,

myScene.physicsWorld.gravity = CGVectorMake(0.0f, -1.0f);