デスクトップとVRの切り替えはどのようにできますか? 私はデスクトップ上でマウスカーソルを使用したいと思います.VRに入ると、カーソルを融合させて別のカメラに切り替える必要があります。ここフレーム間カメラ切り替え出口vrと入力vr
は私のコードです:
<a-entity id="cam-desktop" camera="userHeight: 1.6; zoom:1 " look-controls mouse-cursor>
</a-entity>
<a-entity id="cam-vr" camera="userHeight: 1.6; zoom:1 " look-controls>
<a-animation begin="cursor-fusing" delay=" 3000" attribute="camera.zoom" from="1" to="4" dur="1000"></a-animation>
<a-animation begin="click" delay="500" attribute="camera.zoom" from="4" to="1" dur="1000"></a-animation>
<a-entity cursor="fuse: true; fuseTimeout:4000" geometry="primitive: ring; radiusInner: 0.02; radiusOuter: 0.03; thetaLength: 360; thetaStart: 0" rotation="0 0 90" position="0 0 -1" material="color: black; side: double; shader: flat">
<a-animation begin="cursor-fusing" attribute="geometry.thetaLength" from="360" to="0" easing="linear" dur="3000"></a-animation>
<a-animation begin="mouseleave" attribute="geometry.thetaLength" from="360" to="360" dur="0"></a-animation>
</entity>
</a-entity>
はどうもありがとうございました!
私はそれを得ることはありません、それは動作しません: -/ vr-camとdesktop-camはなぜ同時にfalseでtrueですか? #vrではcam-vrがアクティブで、非vrではアクティブではありません。 #vrでアクティブではない非vrでアクティブな#cam-desktop。 カメラは同時にアクティブではありませんでした。 :-( – Stephan
私はこれが好きで、同時にアクティブではないようにしました。次の行には、適切なアクティブなものを設定しました。私は単純なチェックにスワップできます。 –
@Stephanは簡単なスイッチで更新しました。 –