簡體   English   中英

如何將圖像附加到氬氣中的參考系,以便它隨相機移動到用戶將手機移動到的任何位置

[英]How do I attach an image to the reference frame in argon so that it moves with the camera wherever the user moves the phone to

如何將圖像附加到氬氣中的參考系,以便它根據用戶將手機指向的任何位置與相機一起移動? 基本上,我希望它像 HUD 一樣,在我的情況下,它只是我在 photoshop 中設計的靜止圖像,我想像地圖鍵一樣工作。

我已經根據一些 A-Frame 文檔嘗試了以下操作,但它似乎不起作用。 它似乎根本沒有改變應用程序。 我把它放在我的 ar-scene 中。

<ar-camera>
      <a-entity>

        <a-image src="#imgKey" width="4" height="2" scale="1 1 1" position="0 0 0">
        </a-image>

      </a-entity>
</ar-camera>

有任何想法嗎?

這是有效的代碼。 簡單地把它放在 ar-scene 中。 這是一個定位問題:

 <a-entity position="0 0 5">

      <ar-camera>

          <a-image src="#imgKey" width="4" height="2" scale="1 1 1" position="0 0 -5"></a-image>

      </ar-camera>

  </a-entity>

暫無
暫無

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

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