How to set the camera Target correctly

Adjust camera.target. If the value is too large, the model deformation is flash shrink

  1. set the near and far plane of the camera:
    camera.minZ = 0.1
    camera.maxZ = 10000

https://help.autodesk.com/view/MAYAUL/2024/ENU/?guid=GUID-D69C23DA-ECFB-4D95-82F5-81118ED41C95

  1. scale down the coordinates you get from the mercator function and use this scaling factor trough your app when dealing with coordinates of the mesh
        res.meshes[0].position.x += modelPos.x / 100_000
        res.meshes[0].position.y += modelPos.y / 100_000
  1. set the target of the camera
        camera.setTarget(res.meshes[0])
2 Likes