Calculate the position of an element inside a photosphere

前端 未结 2 1764
野趣味
野趣味 2021-01-25 20:01

Im using an a-sky element to display a 360° photosphere.

My problem is that I have to place inside the photosphere some elements that must act like \'markers\'; but I do

2条回答
  •  余生分开走
    2021-01-25 20:43

    If you want to calculate position on the a-sky sphere surface, I have a method. make a ray from camera's position, and this ray will hit on sphere. this hit point is the position that we want to calculate. the code is like:

    
    
      
      
    
    sphere position
    
    
    
    
      
        
      
        
    
    
    

提交回复
热议问题