A帧动画位置
A-frame animation position
我想为一个盒子做一个动画,让盒子离用户越来越近。我试过了,但这对我不起作用:
<a-entity id="enemy">
<a-box material="src: #texture_4" width="0" height="15" depth="4" transparent="true" opacity="0.75" position="0 0 -150" rotation="0 100 0" scale="2 0.5 3"></a-box>
<a-animation atribute="position" to="0 0 0" fill="forwards"></a-animation>
</a-entity>
attribute
拼错了。
<a-animation attribute="position" to="0 0 0" fill="forwards"></a-animation>
并且您需要为框而不是框的父项设置动画。你的代码是从 0 0 0 到 0 0 0 动画敌人。
<a-entity>
<a-box><a-animation/></a-box>
</a-entity>
我想为一个盒子做一个动画,让盒子离用户越来越近。我试过了,但这对我不起作用:
<a-entity id="enemy">
<a-box material="src: #texture_4" width="0" height="15" depth="4" transparent="true" opacity="0.75" position="0 0 -150" rotation="0 100 0" scale="2 0.5 3"></a-box>
<a-animation atribute="position" to="0 0 0" fill="forwards"></a-animation>
</a-entity>
attribute
拼错了。
<a-animation attribute="position" to="0 0 0" fill="forwards"></a-animation>
并且您需要为框而不是框的父项设置动画。你的代码是从 0 0 0 到 0 0 0 动画敌人。
<a-entity>
<a-box><a-animation/></a-box>
</a-entity>