Reverse gravity on node only

64 Views Asked by At

I would like to reverse the gravity on a single node, but I can't find any property to do that.

I saw that you can change the gravity of the world:

self.physicsWorld.gravity = CGVector(dx: 0, dy: 1)

But it doesn't exist for a node:

// I would like do this
node.physicsBody.gravity = CGVector(dx: 0, dy: 1)

How can I do this?

Thanks

0

There are 0 best solutions below