如果用鼠标拖拽一个3D物体

代码如下,获取到的世界坐标不对
touchMove(event: EventTouch)

{

    const camera = this._mainCamera.camera;

    const pos = new Vec3();

    const location = event.getLocation();

    const screenPos = new Vec3(location.x, location.y, 0.5);

    camera.screenToWorld(pos, screenPos);

    this._product.node.setWorldPosition(pos);

}

应该用射线实现

请问怎么用射线实现移动物体呢,我目前是可以用射线获取到3d物体

明白了,是获取到的PhysicsRayResult的hitPoint吗