0
我有以下代码来手动设置Box2D世界中(动态)对象的位置(借助EaselJS绘制)。 不幸的是setTransform
返回此错误。Box2D&EaselJS,setTransform返回一个错误
Uncaught TypeError: Cannot read property 'position' of undefined
这是代码
// during drag and drop
if(mouseJoint & isMouseDown) {
mouseJoint.SetTarget(new b2Vec2(mouseX, mouseY));
var body = mouse.getBodyAtMouse();
if(body != null) {
body.SetAngularVelocity(0);
body.SetAngle(0);
body.SetTransform(b2Vec2(10,10), 0);
}
...
真!我现在得到“'未定义'不是一个函数(评估'a.GetAngle()')”,我应该通过什么作为第二个参数? –