【发布时间】:2019-12-05 16:04:58
【问题描述】:
如果光标位于对象上方并且单击鼠标,我会尝试让点击时消失,如果在新位置重生则让。
我使用 aframe-event-set-component (https://www.npmjs.com/package/aframe-event-set-component) 来实现这一点,但我无法传递新的随机生成位置。
希望有人能帮帮我:)
我尝试使用字符串插值和数据绑定传递新的位置坐标,但没有成功。
<a-entity>
<a-gltf-model
src="../../assets/models/CoinBlock.gltf"
position="1.5 2 -0.5"
rotation="15 -50 0"
radius="1.25"
scale="0.002 0.002 0.002"
event-set__down="_event: mousedown; position: -1 0.5 -0.5; rotation: -45 45 0"
</a-gltf-model>
【问题讨论】: