fixed mouse joint

This commit is contained in:
2youyouo2
2017-06-27 10:12:21 +08:00
parent 93e026ecdc
commit 0101ff3137
+8 -1
View File
@@ -259,9 +259,16 @@ var MouseJoint = cc.Class({
},
update: function () {
if (cc.Camera && cc.Camera.main && this._pressPoint) {
if (!this._pressPoint) {
return;
}
if (cc.Camera && cc.Camera.main) {
this.target = cc.Camera.main.getCameraToWorldPoint(this._pressPoint);
}
else {
this.target = this._pressPoint;
}
}
});