objective c - Bodies connected by a joint must be added to the same CCPhysicsNode, however two bodies are under the same CCPhysicsNode but -
objective c - Bodies connected by a joint must be added to the same CCPhysicsNode, however two bodies are under the same CCPhysicsNode but -
i making application tutorial.
https://www.makegameswith.us/tutorials/getting-started-with-spritebuilder/spritebuilder-physics/
i made jointnode straight in code this
_mousejoint = [ccphysicsjoint connectedspringjointwithbodya:_mousejointnode.physicsbody bodyb:_catapultarm.physicsbody anchora:ccp(0, 0) anchorb:ccp(34, 138) restlength:0.f stiffness:3000.f damping:150.f];
but though certainly 2 nodes under same ccphysicnode,
it shows error
bodies connected joint must added same ccphysicsnode,
does have same issue this?
i had same problem, turns out had not enabled physics on _mousenode. enabling physics on node solved problem.
objective-c cocos2d-iphone spritebuilder
Comments
Post a Comment