.. | .. |
---|
359 | 359 | // //GetFileRoot(); |
---|
360 | 360 | |
---|
361 | 361 | // sept 2014: // |
---|
362 | | - GraphreeD.RENDERME = 3; // patch for Merge objects |
---|
| 362 | + GrafreeD.RENDERME = 3; // patch for Merge objects |
---|
363 | 363 | float[] thedata = bvh.animation.getBoneData(0); |
---|
364 | 364 | |
---|
365 | 365 | os.x = (float) (path.get(i).toParent[3][0]); // - thedata[frame*6]); |
---|
.. | .. |
---|
938 | 938 | |
---|
939 | 939 | groundid = floorid; |
---|
940 | 940 | |
---|
| 941 | + // green |
---|
941 | 942 | CameraPane.debugpoint.toParent[3][0] = groundx; |
---|
942 | 943 | CameraPane.debugpoint.toParent[3][1] = floor.y; |
---|
943 | 944 | CameraPane.debugpoint.toParent[3][2] = groundz; |
---|
.. | .. |
---|
998 | 999 | |
---|
999 | 1000 | lastsoundtime = CameraPane.framecount; |
---|
1000 | 1001 | |
---|
1001 | | - GraphreeD.hassound = true; |
---|
| 1002 | + GrafreeD.hassound = true; |
---|
1002 | 1003 | } |
---|
1003 | 1004 | // else |
---|
1004 | 1005 | // System.out.println("skipped"); |
---|
.. | .. |
---|
1016 | 1017 | // floor.z += posz; |
---|
1017 | 1018 | |
---|
1018 | 1019 | // System.out.println("Allo " + sourcenode); |
---|
| 1020 | + // purple |
---|
1019 | 1021 | CameraPane.debugpoint2.toParent[3][0] = floor.x;// + posx; |
---|
1020 | 1022 | CameraPane.debugpoint2.toParent[3][1] = ground; // floor.y;// + sourcenode.parent.toParent[3][1]; |
---|
1021 | 1023 | CameraPane.debugpoint2.toParent[3][2] = floor.z;// + posz; |
---|
.. | .. |
---|
1052 | 1054 | v0.z = groundz - floor.z; |
---|
1053 | 1055 | |
---|
1054 | 1056 | double distance = Math.sqrt(v0.dot(v0)); |
---|
1055 | | - double maxdist = 0.004; |
---|
| 1057 | + double maxdist = 0.04; |
---|
1056 | 1058 | |
---|
1057 | 1059 | if (distance > maxdist) |
---|
1058 | 1060 | { |
---|
.. | .. |
---|
1078 | 1080 | sourcenode.toParent = LA.newMatrix(); |
---|
1079 | 1081 | sourcenode.fromParent = LA.newMatrix(); |
---|
1080 | 1082 | } |
---|
| 1083 | + |
---|
| 1084 | + v0.x = v0.z = 0; |
---|
| 1085 | + |
---|
| 1086 | + this.get(0).TransformToWorld(v0); |
---|
| 1087 | + |
---|
| 1088 | + // cyan |
---|
| 1089 | + CameraPane.debugpoint3.toParent[3][0] = v0.x; |
---|
| 1090 | + CameraPane.debugpoint3.toParent[3][1] = ground; |
---|
| 1091 | + CameraPane.debugpoint3.toParent[3][2] = v0.z; |
---|
| 1092 | + |
---|
1081 | 1093 | LA.matConcat(sourcenode.toParent, transformnode.toParent, sourcenode.toParent); |
---|
1082 | 1094 | LA.matInvert(sourcenode.toParent, sourcenode.fromParent); |
---|
| 1095 | + |
---|
| 1096 | + v0.x = v0.z = 0; |
---|
| 1097 | + |
---|
| 1098 | + this.get(0).TransformToWorld(v0); |
---|
| 1099 | + |
---|
| 1100 | + // red |
---|
| 1101 | + CameraPane.debugpoint4.toParent[3][0] = v0.x; |
---|
| 1102 | + CameraPane.debugpoint4.toParent[3][1] = ground; |
---|
| 1103 | + CameraPane.debugpoint4.toParent[3][2] = v0.z; |
---|
1083 | 1104 | } |
---|
1084 | 1105 | } |
---|
1085 | 1106 | |
---|
.. | .. |
---|
1835 | 1856 | { |
---|
1836 | 1857 | SetRotation(sourcenode, new cVector(floor), new cVector(centroid)); |
---|
1837 | 1858 | } |
---|
1838 | | - |
---|
| 1859 | + |
---|
1839 | 1860 | if (setposition) |
---|
1840 | 1861 | { |
---|
1841 | 1862 | if (floorobject != null) |
---|