I've been attempting to transfer the position, direction, and up vector data from a three.js camera to a ViewOrientation3D object in Revit. Unfortunately, I am encountering an issue when trying to set the orientation, resulting in the following exception being thrown.
Exception thrown: 'Autodesk.Revit.Exceptions.ArgumentsInconsistentException' in RevitAPI.dll
According to the ViewOrientation3D documentation, this exception occurs when "The vectors upDirection and forwardDirection are not perpendicular." Which specific parameters from the three.js camera should I be using for this operation?
ViewOrientation3D orientation = new ViewOrientation3D(threePosition, threeUp, threeDirection);
view.SetOrientation(orientation);
I would greatly appreciate any suggestions or guidance on how to resolve this issue!