簡體   English   中英

A框架,通過鍵盤/鼠標控制“手動控件”

[英]A-frame, controlling 'hand-controls' with keyboard/mouse

這可能嗎?

由於嚴重缺乏對框架的了解以及實體組件系統如何工作,因此我只是嘗試在hand-controls組件中調用hand方法之一。

// I want to see a grip event 
handControllerDOMElementReference.components['hand-controls'].onGripDown()

這什么也沒做。 跟蹤“手控”組件中發生的所有事件時,看起來好像都調用了手勢和動畫。 但是什么也沒發生,所以我假設我完全以錯誤的方式來做。

什么是正確的方法?

當前, hand-controls響應某些組件(例如oculus-touch-controlsvive-controls發出的事件,請參見https://github.com/aframevr/aframe/blob/master/src/components/hand-controls.js# L57

當然也可以讓其他組件提供這些事件,例如https://github.com/chenzlabs/gearvr-controls或ryanbetts aframe-daydream-controller-component

也許您可以手動生成這些事件,或者更好地創建一個在應用時生成它們的組件?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM