Hi,
cocos2d version 0.8.1:
I have an AtlasSprite and I am using box2d. When ccTouchesEnded gets executed, I call setPosition below on the actor:
- (void)setPosition:(CGPoint)aPosition {
actorAtlasSprite.position = CGPointMake( aPosition.x, aPosition.y);
actorAtlasSprite.rotation = -1 * CC_RADIANS_TO_DEGREES(body->GetAngle());
body->SetTransform( b2Vec2(aPosition.x/32, aPosition.y/32), body->GetAngle());
}
I have DrawDebugData on. I see the body moving (gravity causing it to fall), but the AtlasSprite moves to the position but DOES NOT fall with the body.
Please point me in the right direction.
Thanks Again,
Kenny