什么是新 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;