smartfoxserver 2x 解决 Math NAN

//y轴对应 unity 的z轴

                    //必须要重新赋取,不然 用三角函数===============NAN

                    float x1=u.position.x-mu.position.x;

                    float y1=u.position.z-mu.position.z;

                    float c1=mu.position.Distance(u);

                    double a=new Double(x1);

                    double b=new Double(y1);

                    double c=new Double(c1);

                    double ang = 0;

                    if (a == 0) {

                        ang = 90;

                    }else {

                        ang =Math.abs(Math.toDegrees(Math.atan(b/a)));

                    }

在网上都搜不到。。。自己反反复复打印测试

要重新 new 个出来才行,真是恶心,,,折腾得烦死了

你可能感兴趣的:(server)