If you want to attach a wheel to a car, and you want the wheel be affected by gravity when the car is flying. How do you make a physics body for the wheel which sais: "The wheel is attached to the car with a spring and affected by gravity."?
I tried this:
SKPhysicsBody *phys = [SKPhysicsBody bodyWithCircleOfRadius:20];
But then the wheel just falls off the car. It is not "attached" to the car.
To put it other way: If you grab a toy car the wheels go down a little bit because gravity pulls them. But they dont fall down to the floor. They are attached to the car.
Or think of a spring with a weight on it. When you shake it, the weight bounces around. But it is attached to the spring and doesnt fall down.
What is the proper way to simulate things like this in Sprite Kit? I found there is something called SKPhysicsJointSpring
. I will post an answer when I figure out.