This is the error message
Aborting due to Chipmunk error: Unsolvable constraint.
Failed condition: determinant != 0.0
Source:CatNap/libs/Chipmunk/include/chipmunk/constraints/util.h:123
(gdb)
- Inside the init method
Code: Select all
mouse = cpMouseNew(space);
self.isTouchEnabled = YES;
Code: Select all
- (void)registerWithTouchDispatcher {
[[CCTouchDispatcher sharedDispatcher] addTargetedDelegate:self priority:0 swallowsTouches:YES];
}
- (BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event {
CGPoint touchLocation = [self convertTouchToNodeSpace:touch];
cpMouseGrab(mouse, touchLocation, false);
return YES;
}
- (void)ccTouchMoved:(UITouch *)touch withEvent:(UIEvent *)event {
CGPoint touchLocation = [self convertTouchToNodeSpace:touch];
cpMouseMove(mouse, touchLocation);
}
- (void)ccTouchEnded:(UITouch *)touch withEvent:(UIEvent *)event {
cpMouseRelease(mouse);
}
- (void)ccTouchCancelled:(UITouch *)touch withEvent:(UIEvent *)event {
cpMouseRelease(mouse);
}