Quantcast
Channel: CoderzHeaven » density
Browsing latest articles
Browse All 3 View Live

How to rotate a body manually in Box2D?

The below code helps you to rotate a body in Box2D manually. -(void) start { rot_sprite = [CCSprite spriteWithFile:[NSString stringWithFormat:@"rot_sprite.png" ]]; [self addChild: rot_sprite];...

View Article



How to shoot a bullet in the direction of touch in Box2D iphone?

write the below code in “ccTouchesBegan” function and you are done. Here the ballBody represents the bullet body. You can increase the power variable to increase bullet speed. UITouch *touch = [touches...

View Article

How to add sprite to a body in Box2D in Adobe AIR, FLEX and FLASH? Or Add...

The below code is for FlashBuilder 4, If you are using FlexBuilder3 use addChild() instead of the commented block in the following code. public function addCircle(){x:Number, y: Number, radius:Number,...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images