iOS 7のSpriteKitには物理エンジンが搭載されているようです。 今回は、ちょっとだけそれを使ってみます。 実装 タップしたポイントに赤い四角を表示させ、そのまま重力で落下するサンプルを作ってみます。 #import "CMMyScene.h" @implementation CMMyScene -(id)initWithSize:(CGSize)size { if (self = [super initWithSize:size]) { // ここに初期処理 } return self; } -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { CGPoint location = [touches.anyObject locationInNode:self]; [self addRedSquare:l
![[iOS 7] SpriteKitの物理エンジンを使ってみた -超入門- | DevelopersIO](https://cdn-ak-scissors.b.st-hatena.com/image/square/5771c24e024f12a499edf770981086568ca369b4/height=288;version=1;width=512/https%3A%2F%2Fdevio2023-media.developers.io%2Fwp-content%2Fuploads%2F2013%2F09%2Fios7_logo_api.png)