mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
fixed mouse joint
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user