I'm trying to add a joint to the scene physicsWorld property, but I am getting a EXC_BAD_ACCESS. This is the code I'm using.
SKPhysicsJointFixed *fixedJoint = [SKPhysicsJointFixed jointWithBodyA:self.mousePoint.physicsBody bodyB: self.box.physicsBody anchor:touchPoint];
[self.physicsWorld addJoint:fixedJoint]; // Error happens here.
I'm calling it when a touch begins. Does anyone know whats going on?
i encountered the same problem with you, the answer is very easy, just add the node to the scene before adding it to the physicsworld.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With