Copy link to clipboard
Copied
I am looking for forums and documentation to write a mouse move to get 3D coordinates (also instantly display the coordinates in my Field)
Is it possible to execute 3D javascript using rich media buttons or other possible buttons?
Because I can only execute javascript right on the 3D model to be effective.
The fragment code is as follows:
-------------------------------------------------------------------------------------------------------------------------------
myAnnotObj = getAnnots3D(0)[0].context3D;
myAnnotObj.scene.selectedNode = myAnnotObj.scene.meshes.getByName("ModelNode1");
myAnnotObj.runtime.overrideSelection=true;
var myMouseHandlingFunction = app.trustedFunction(
function(event)
{
if (event.isMouseMove)
{
var clickedMesh = null;
if(event.hits.length > 0)
clickedMesh = event.hits[0].position;
-------------------------------------------------------------------------------------------------------------------------------
I got the error:
TypeError: event.hits[0] is undefined
15: Batch: Exec
How can I make the event in the function have a mouse event?
I am not sure if this method is feasible.
I would like to ask the experts, thank you for taking the time to answer!
Have something to add?