0

新しい box2d バージョンの b2PolygonShape SetAsOrientedBox の代替品は何ですか。

たとえば、この例の正しいコードは何でしょう (アクション スクリプト内)

var leftAxleContainerShape:b2PolygonShape = new b2PolygonShape();
            leftAxleContainerShape.SetAsOrientedBox(axleContainerWidth/worldScale,axleContainerHeight/worldScale,new b2Vec2(-axleContainerDistance/worldScale,axleContainerDepth/worldScale),axleAngle*degreesToRadians);
            var leftAxleContainerFixture:b2FixtureDef = new b2FixtureDef();
            leftAxleContainerFixture.density=3;
            leftAxleContainerFixture.friction=3;
            leftAxleContainerFixture.restitution=0.3;
            leftAxleContainerFixture.filter.groupIndex=-1;
            leftAxleContainerFixture.shape=leftAxleContainerShape;
4

0 に答える 0