У меня проблема с ccTouchesBegan
<code>
- (void)ccTouchesBegan:(UITouch *)touches withEvent:(UIEvent *)event {
if (_mouseJoint != NULL) return;
_paddleBody=body2;
UITouch *myTouch = [touches anyObject];
CGPoint location = [myTouch locationInView:[myTouch view]];
location = [[CCDirector sharedDirector] convertToGL:location];
b2Vec2 locationWorld = b2Vec2(location.x/PTM_RATIO, location.y/PTM_RATIO);
if (_paddleFixture->TestPoint(locationWorld)) {
b2MouseJointDef md;
md.bodyA = groundBody;
md.bodyB = _paddleBody;
md.target = locationWorld;
md.collideConnected = true;
md.maxForce = 1000.0f * _paddleBody->GetMass();
_mouseJoint = (b2MouseJoint *)_world->CreateJoint(&md);
_paddleBody->SetAwake(true);
}
}
на линии
<code>location = [[CCDirector sharedDirector] convertToGL:location];
у меня такая ошибка
<code>
(gdb) continue
Program received signal: “EXC_BAD_ACCESS”.
Previous frame inner to this frame (gdb could not unwind past this frame)
Previous frame inner to this frame (gdb could not unwind past this frame)
и я не понимаю, почему
Помогите мне, пожалуйста