If we hit a wall and we are pressing the trigger button, like before, we would like to call the createSpatialAnchor method, with the difference that we now send the position and rotation of the prefab according to the hit position of the ray.
如果我們撞到牆壁並按下觸發按鈕,就像之前一樣,我們會調用 createSpatialAnchor 方法,不同的是,現在我們會根據射線的撞擊位置發送預製件的位置和旋轉。