什么是b2PolygonShape SetAsOrientedBox的替代品 对于新的box2d版本。
例如,这个例子的正确代码是什么(在动作脚本中)
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;