I am trying to update my Revit model using APIs. for which I have already had APIs where they accept the 3D vector position where I want my asset or object to be added. The problem here is when I am doing a hittest
this.viewer.clientToWorld(evt.clientX, evt.clientY, true);
the position which I get here seems working on well to place the object on the viewer but when I send the same position to my Revit API the object appears to add away from my actual click
so the thing which I want to understand here is what I am doing wrong is Revit software has some other coordinate system that I need to convert from my position vector?
I have tried to calculate global offset too but even that didn't work well
var offset = viewer.model.getData().globalOffset
the value for offset which I get is
{x: -36.83258967447005, y: 3.198711699197691, z: 45.28371391552952}
so the position/intersection point which I get from the hit test I did
const worldCoords = hittest.point.clone().sub(offset);