I'm trying to render a 3D model using A-Frame. This is what I've done
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>glTF Test</title>
<meta name="description" content="OBJ Test">
<script src="https://aframe.io/releases/1.1.0/aframe.min.js"></script>.
</head>
<body>
<a-scene>
<!-- Assets definition -->
<a-assets>
<a-asset-item id="object-ref" src="/public/Scene/scene.gltf"></a-asset-item>
</a-assets>
<!-- Using the asset management system. -->
<a-gltf-model src="#object-ref" position="0 25 0"></a-gltf-model>
<!-- Camera and cursor -->
<a-camera position="0 25 15">
<a-cursor></a-cursor>
</a-camera>
<!-- Environment elements-->
<a-sky color="#000000"></a-sky>
<a-plane color="#1A1A1A" rotation="-90 0 0" width="500" height="500"></a-plane>
</a-scene>
</body>
</html>
This code works and rendering is done well.
However,I'm tryng to add some event listeners that enable to get the sceene coordinates (x, y, z) of the point where I clicked with mouse.
Is there any way to do this?
question from:
https://stackoverflow.com/questions/65844344/get-coordinates-of-a-scene-with-a-click-in-a-frame 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…