Questions tagged [skphysicsbody]

An SKPhysicsBody object is used to add physics simulation to a node. When a scene processes a new frame, it performs physics calculations on physics bodies attached to nodes in the scene. These calculations include gravity, friction, and collisions with other bodies. You can also apply your own forces and impulses to a body. After the scene completes these calculations, it updates the positions and orientations of the node objects.

An SKPhysicsBody object is used to add physics simulation to a node. When a scene processes a new frame, it performs physics calculations on physics bodies attached to nodes in the scene. These calculations include gravity, friction, and collisions with other bodies. You can also apply your own forces and impulses to a body. After the scene completes these calculations, it updates the positions and orientations of the node objects.

To add physics to a node, create and configure an SKPhysicsBody object and then assign it to the physicsBody property of the SKNode object. A physics body must be associated with a node object before you apply forces or impulses to it.

Click Here for Apple's Documentation of SKPhysicsBody.

812 questions
-3
votes
2 answers

Successful Jump detection in sprite-kit

My game play is an animal jumping over holes. If it hits a hole, it loses life. But if it makes three successful jumps it unlocks an achievement. How do I detect a successful jump? I have the logic for detecting failed jumps using SKPhysics​Contact…
merloin
  • 31
  • 3
-3
votes
1 answer

How to ignore collision under certain circumstances

I am trying to make an infinite bouncing game like doodle jump. I am trying to allow the ball to pass through the block when it is heading in the upwards Y direction but when the ball is falling allow it to make contact with the block.
heyguyss
  • 1
  • 1
1 2 3
54
55