ActionScript から c++ box2d にいくつかのコードを移植しようとして
いますが、ActionScript のコードは 2011 年のものです。
最新のものを使用しています。
とにかく、これは私がアクションスクリプトに持っているものです:
var leftAxle:b2Body=world.CreateBody(leftAxleBodyDef);
leftAxle.CreateFixture(leftAxleFixture);
// this is the part i need to port , there is no SetPosition in the box2d 2.2+ version
leftAxle.SetPosition(new b2Vec2(carPosX/worldScale-axleContainerDistance/worldScale-axleContainerHeight/worldScale*Math.cos((90-axleAngle)*degreesToRadians),carPosY/worldScale+axleContainerDepth/worldScale+axleContainerHeight/worldScale*Math.sin((90-axleAngle)*degreesToRadians)));
斜辺角を持つボックスを基本的に