|
@@ -121,7 +121,7 @@ public class UserSettings {
|
|
|
public class BowRotateConvert {
|
|
public class BowRotateConvert {
|
|
|
public float screenSize = 60; //屏幕尺寸(英寸)
|
|
public float screenSize = 60; //屏幕尺寸(英寸)
|
|
|
public float screenDistance = 2.5f; //玩家距离屏幕多远(米)
|
|
public float screenDistance = 2.5f; //玩家距离屏幕多远(米)
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 游戏旋转角度 : 实际旋转角度
|
|
// 游戏旋转角度 : 实际旋转角度
|
|
|
public float GetRate() {
|
|
public float GetRate() {
|
|
|
float rateMeterInch = 0.0254f; //比率(米:英寸)
|
|
float rateMeterInch = 0.0254f; //比率(米:英寸)
|
|
@@ -144,12 +144,12 @@ public class BowRotateConvert {
|
|
|
//单位屏幕比值对应大小
|
|
//单位屏幕比值对应大小
|
|
|
float unitWeightSize = rateMeterInch * screenSize
|
|
float unitWeightSize = rateMeterInch * screenSize
|
|
|
/ (Mathf.Pow(weightScreenWidth, 2) + Mathf.Pow(weightScreenHeight, 2));
|
|
/ (Mathf.Pow(weightScreenWidth, 2) + Mathf.Pow(weightScreenHeight, 2));
|
|
|
- float q1 = (float) Math.Tan(5.79 / 180 * Math.PI) * screenDistance; //实际玩家到左树的横向距离
|
|
|
|
|
|
|
+ float q1 = (float) Math.Tan(5.56 / 180 * Math.PI) * screenDistance; //实际玩家到左树的横向距离
|
|
|
float w1 = q1 / unitWeightSize; //实际玩家到左树的横向距离比重
|
|
float w1 = q1 / unitWeightSize; //实际玩家到左树的横向距离比重
|
|
|
return w1;
|
|
return w1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private float GetTreeAngleInRadian() {
|
|
private float GetTreeAngleInRadian() {
|
|
|
- return (float) (30.11 / 180 * Math.PI);
|
|
|
|
|
|
|
+ return (float) (27.3 / 180 * Math.PI);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|