Advertisement

[Unity][UGUI][NGUI]小地图切换摄像机位置偏差量计算

阅读量:
复制代码
 ...

    
     float height = this.transform.position.y;
    
     float rot_x = this.transform.eulerAngles.x;
    
     float a = Mathf.Tan((90 - rot_x) * Mathf.Deg2Rad) * height;
    
     print("a: " + a);
    
 ...
    
    
    
    

相关文献资料:

  1. [Unity][NGUI]NGUI精灵小地图点击跳转

  2. [Unity]获取Inspector视图中Transform.Rotation的数值

参考文献:

1.Unity三维数学(三角函数)

2.[三角形的角度计算器](https://tool.52010

全部评论 (0)

还没有任何评论哟~