protected void mouseMoveHandler() { if (_mj != null) { Vector3 pos = Camera.main.ScreenToWorldPoint(Input.mousePosition); //屏幕坐标转世界坐标 _mj.SetTarget(new b2Vec2(pos.x, pos.y)); } }
public void MouseMove(b2Vec2 p) { m_mouseWorld = p; if (m_mouseJoint != null) { m_mouseJoint.SetTarget(p); } }