8
9

More than 5 years have passed since last update.

cocos2d-x tips

Last updated at Posted at 2014-03-30

意外にいろいろと日本語で検索しても出ないので、メモしとくよ!

PhysicsBody::createEdgeBox(Size)
指定したサイズの矩形の壁を作り、外と中を区切る。
画面サイズでこれを作成すれば、画面内から物理オブジェクトが出ないようにできる。
(※高速で動くオブジェクトは簡単に抜けるので注意)

ジョイントの使い方

良くわかってないけど、間違ってたら誰か指摘してくれるよね。

生成方法
PhysicsJoint* joint = PhysicsJointXXXX::construct(...);
physicsWorld->addJoint(joint);

PhysicsJointFixed::construct(PhysicsBody* a, PhysicsBody* b, const Point& anchr)

aとbの中心同士を重ねて固定する? anchrは空間上の座標っぽい。

8
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
9