.. | .. |
---|
261 | 261 | |
---|
262 | 262 | // LA.matConcat(toParent, hip.get(0).toParent, toParent); |
---|
263 | 263 | |
---|
264 | | - CameraPane.debugpoint.toParent[3][0] = poship.x; |
---|
265 | | - CameraPane.debugpoint.toParent[3][1] = poship.y; |
---|
266 | | - CameraPane.debugpoint.toParent[3][2] = poship.z; |
---|
| 264 | + CameraPane.debugpointG.toParent[3][0] = poship.x; |
---|
| 265 | + CameraPane.debugpointG.toParent[3][1] = poship.y; |
---|
| 266 | + CameraPane.debugpointG.toParent[3][2] = poship.z; |
---|
267 | 267 | |
---|
268 | 268 | LA.matInvert(toParent, fromParent); |
---|
269 | 269 | |
---|
.. | .. |
---|
283 | 283 | poship.x = hip.get(0).toParent[3][0]; |
---|
284 | 284 | poship.y = hip.get(0).toParent[3][1]; |
---|
285 | 285 | poship.z = hip.get(0).toParent[3][2]; |
---|
| 286 | + |
---|
| 287 | + temp.x = 1; |
---|
| 288 | + temp.y = 0; |
---|
| 289 | + temp.z = 0; |
---|
| 290 | + |
---|
| 291 | + LA.xformDir(temp, hip.get(0).toParent, temp); |
---|
| 292 | + |
---|
| 293 | + angleYhip = Math.atan2(-temp.z, temp.x); |
---|
286 | 294 | |
---|
287 | | - // AT*AR = A'T*BT*A'R*BR |
---|
288 | | - // |
---|
289 | | - LA.matInvert(hip.get(0).toParent, matrix); |
---|
| 295 | + LA.matIdentity(matrix); |
---|
| 296 | + LA.matYRotate(matrix, angleYhip); |
---|
| 297 | + LA.matTranslate(matrix, poship.x, poship.y, poship.z); |
---|
| 298 | + |
---|
| 299 | + //LA.matInvert(hip.get(0).toParent, matrix); |
---|
| 300 | + LA.matInvert(matrix, matrix); |
---|
290 | 301 | |
---|
291 | 302 | //LA.matIdentity(matrix); |
---|
292 | 303 | //LA.matTranslate(matrix, -poship.x, -poship.y, -poship.z); |
---|
293 | 304 | |
---|
294 | 305 | LA.matConcat(toParent, matrix, toParent); |
---|
295 | 306 | |
---|
296 | | -// poship.x = hip.get(0).toParent[3][0]; |
---|
297 | | -// poship.y = hip.get(0).toParent[3][1]; |
---|
298 | | -// poship.z = hip.get(0).toParent[3][2]; |
---|
299 | | -// |
---|
300 | | -// temp.x = 1; |
---|
301 | | -// temp.y = 0; |
---|
302 | | -// temp.z = 0; |
---|
303 | | -// |
---|
304 | | -// LA.xformDir(temp, hip.get(0).toParent, temp); |
---|
305 | | -// |
---|
306 | | -// angleYhip = Math.atan2(-temp.z, temp.x); |
---|
307 | | - |
---|
| 307 | + |
---|
308 | 308 | LA.matConcat(toParent, hip.get(0).toParent, matrix); |
---|
309 | 309 | pos.x = hip.get(0).toParent[3][0]; |
---|
310 | 310 | pos.y = hip.get(0).toParent[3][1]; |
---|
.. | .. |
---|
324 | 324 | // LA.matYRotate(toParent, angleY - angleYhip); |
---|
325 | 325 | // LA.matTranslate(toParent, pos.x - poship.x, pos.y - poship.y, pos.z - poship.z); |
---|
326 | 326 | |
---|
327 | | - CameraPane.debugpoint2.toParent[3][0] = pos.x; |
---|
328 | | - CameraPane.debugpoint2.toParent[3][1] = pos.y; |
---|
329 | | - CameraPane.debugpoint2.toParent[3][2] = pos.z; |
---|
| 327 | + CameraPane.debugpointP.toParent[3][0] = pos.x; |
---|
| 328 | + CameraPane.debugpointP.toParent[3][1] = pos.y; |
---|
| 329 | + CameraPane.debugpointP.toParent[3][2] = pos.z; |
---|
330 | 330 | |
---|
331 | | - CameraPane.debugpoint3.toParent[3][0] = poship.x; |
---|
332 | | - CameraPane.debugpoint3.toParent[3][1] = poship.y; |
---|
333 | | - CameraPane.debugpoint3.toParent[3][2] = poship.z; |
---|
| 331 | + CameraPane.debugpointC.toParent[3][0] = poship.x; |
---|
| 332 | + CameraPane.debugpointC.toParent[3][1] = poship.y; |
---|
| 333 | + CameraPane.debugpointC.toParent[3][2] = poship.z; |
---|
334 | 334 | |
---|
335 | 335 | poship.x = toParent[3][0]; |
---|
336 | 336 | poship.y = toParent[3][1]; |
---|
337 | 337 | poship.z = toParent[3][2]; |
---|
338 | 338 | |
---|
339 | | - CameraPane.debugpoint4.toParent[3][0] = poship.x; |
---|
340 | | - CameraPane.debugpoint4.toParent[3][1] = poship.y; |
---|
341 | | - CameraPane.debugpoint4.toParent[3][2] = poship.z; |
---|
| 339 | + CameraPane.debugpointR.toParent[3][0] = poship.x; |
---|
| 340 | + CameraPane.debugpointR.toParent[3][1] = poship.y; |
---|
| 341 | + CameraPane.debugpointR.toParent[3][2] = poship.z; |
---|
342 | 342 | |
---|
343 | 343 | LA.matInvert(toParent, fromParent); |
---|
344 | 344 | } |
---|
.. | .. |
---|
476 | 476 | currenthip[i] = data[frame3 + i]; |
---|
477 | 477 | } |
---|
478 | 478 | } |
---|
| 479 | + |
---|
| 480 | + static cVector centroid = new cVector(); |
---|
| 481 | + static cVector mocaporigin = new cVector(); |
---|
| 482 | + |
---|
| 483 | + void SetHipOrientation() |
---|
| 484 | + { |
---|
| 485 | + Object3D hip = get(0); |
---|
| 486 | + |
---|
| 487 | + LA.matConcat(toParent, hip.get(0).toParent, matrix); |
---|
| 488 | + |
---|
| 489 | + mocaporigin.x = matrix[3][0]; |
---|
| 490 | + mocaporigin.y = matrix[3][1]; |
---|
| 491 | + mocaporigin.z = matrix[3][2]; |
---|
| 492 | + |
---|
| 493 | + centroid.x = matrix[3][0]; |
---|
| 494 | + centroid.y = matrix[3][1]; |
---|
| 495 | + centroid.z = matrix[3][2]; |
---|
| 496 | +// this.getCentroid(centroid, true); |
---|
| 497 | + |
---|
| 498 | + CameraPane.debugpointG.name = ""; |
---|
| 499 | + CameraPane.debugpointG.toParent[3][0] = mocaporigin.x; |
---|
| 500 | + CameraPane.debugpointG.toParent[3][1] = mocaporigin.y; |
---|
| 501 | + CameraPane.debugpointG.toParent[3][2] = mocaporigin.z; |
---|
| 502 | + |
---|
| 503 | + CameraPane.debugpointP.name = ""; |
---|
| 504 | + CameraPane.debugpointP.toParent[3][0] = centroid.x; |
---|
| 505 | + CameraPane.debugpointP.toParent[3][1] = centroid.y; |
---|
| 506 | + CameraPane.debugpointP.toParent[3][2] = centroid.z; |
---|
| 507 | + |
---|
| 508 | + cVector goal = GetGoal(centroid); |
---|
| 509 | + if (goal != null) |
---|
| 510 | + { |
---|
| 511 | + System.err.println("GOAL change (" + this + "): " + goal + " (was " + goalposx + ", " + goalposz + ")"); |
---|
| 512 | + |
---|
| 513 | + goalposx = goal.x; |
---|
| 514 | + goalposz = goal.z; |
---|
| 515 | + targetdirx = targetdirz = 0; |
---|
| 516 | + } |
---|
| 517 | + |
---|
| 518 | + if (goalposx == 0 && goalposz == 0) |
---|
| 519 | + { |
---|
| 520 | + // No target |
---|
| 521 | + if (ScriptNode.speaker != null) |
---|
| 522 | + { |
---|
| 523 | + Object3D sourcenode = GetFileRoot(); |
---|
| 524 | + Object3D speakernode = ScriptNode.speaker.GetFileRoot(); |
---|
| 525 | + |
---|
| 526 | + //System.err.println("speaker is " + speakernode + "; last was " + ScriptNode.lastspeaker); |
---|
| 527 | + |
---|
| 528 | + Object3D speaker = ScriptNode.speaker; |
---|
| 529 | + |
---|
| 530 | + if (speakernode == sourcenode) |
---|
| 531 | + { |
---|
| 532 | + if (ScriptNode.lastspeaker != null) |
---|
| 533 | + { |
---|
| 534 | + speakernode = ScriptNode.lastspeaker.GetFileRoot(); |
---|
| 535 | + speaker = ScriptNode.lastspeaker; |
---|
| 536 | + } |
---|
| 537 | + else |
---|
| 538 | + return; |
---|
| 539 | + } |
---|
| 540 | + |
---|
| 541 | + cVector dst = new cVector(); |
---|
| 542 | + |
---|
| 543 | + boolean success = speakernode.getCentroid(dst); // , true); |
---|
| 544 | + |
---|
| 545 | + if (!success) |
---|
| 546 | + new Exception().printStackTrace(); |
---|
| 547 | + |
---|
| 548 | + //speakernode.parent.TransformToWorld(dst); |
---|
| 549 | + //sourcenode.parent.TransformToLocal(dst); |
---|
| 550 | + this.parent.TransformToLocal(dst); |
---|
| 551 | + |
---|
| 552 | + goalposx = dst.x; |
---|
| 553 | + goalposz = dst.z; |
---|
| 554 | + } |
---|
| 555 | + else |
---|
| 556 | + return; |
---|
| 557 | + } |
---|
| 558 | + |
---|
| 559 | + cVector temp = new cVector(); |
---|
| 560 | + |
---|
| 561 | + temp.x = 1; |
---|
| 562 | + temp.y = 0; |
---|
| 563 | + temp.z = 0; |
---|
| 564 | + |
---|
| 565 | + LA.xformDir(temp, matrix, temp); |
---|
| 566 | + |
---|
| 567 | + double angleYhip = Math.atan2(-temp.z, temp.x); |
---|
| 568 | + |
---|
| 569 | + double angleYtarget = Math.atan2(goalposx - centroid.x, goalposz - centroid.z); |
---|
| 570 | + |
---|
| 571 | + LA.matIdentity(matrix); |
---|
| 572 | + LA.matTranslate(matrix, -centroid.x, -centroid.y, -centroid.z); |
---|
| 573 | + double angle = CurveAngle(0, angleYtarget - angleYhip, 0.1f); |
---|
| 574 | + LA.matYRotate(matrix, angle); |
---|
| 575 | + LA.matTranslate(matrix, centroid.x, centroid.y, centroid.z); |
---|
| 576 | + |
---|
| 577 | + LA.matConcat(matrix, toParent, toParent); |
---|
| 578 | + |
---|
| 579 | + LA.matInvert(toParent, fromParent); |
---|
| 580 | + |
---|
| 581 | + LA.matConcat(toParent, hip.get(0).toParent, matrix); |
---|
| 582 | + |
---|
| 583 | + centroid.x = matrix[3][0]; |
---|
| 584 | + centroid.y = matrix[3][1]; |
---|
| 585 | + centroid.z = matrix[3][2]; |
---|
| 586 | + |
---|
| 587 | + double dist = LA.distance(centroid, mocaporigin); |
---|
| 588 | + |
---|
| 589 | + CheckForAction(centroid); |
---|
| 590 | + } |
---|
479 | 591 | |
---|
480 | 592 | void WriteTo(java.io.Writer writer) throws Exception |
---|
481 | 593 | { |
---|
.. | .. |
---|
549 | 661 | double pinx; |
---|
550 | 662 | double pinz; |
---|
551 | 663 | |
---|
552 | | - double targetx; |
---|
553 | | - double targetz; |
---|
| 664 | + double targetdirx; |
---|
| 665 | + double targetdirz; |
---|
554 | 666 | |
---|
555 | | - double goalx; |
---|
556 | | - double goalz; |
---|
| 667 | + double goalposx = -20; |
---|
| 668 | + double goalposz = -10; |
---|
557 | 669 | |
---|
558 | 670 | boolean followpath; |
---|
559 | 671 | |
---|
.. | .. |
---|
624 | 736 | scriptactions.clear(); |
---|
625 | 737 | } |
---|
626 | 738 | |
---|
627 | | - static double EPSACTION = 0.1; // 0.075; // 0.1; |
---|
| 739 | + static double EPSACTION = 0.1; // 0.075; // 0.1;Came |
---|
628 | 740 | |
---|
629 | 741 | void AddFromTo(cVector from, cVector to) |
---|
630 | 742 | { |
---|
.. | .. |
---|
910 | 1022 | testvect.set(from); |
---|
911 | 1023 | testvect.sub(fromto.from); |
---|
912 | 1024 | |
---|
| 1025 | + testvect.y = 0; // PATCH |
---|
| 1026 | + |
---|
913 | 1027 | int factor = 1; |
---|
914 | 1028 | |
---|
915 | 1029 | //if (CameraPane.FAST) |
---|
.. | .. |
---|
951 | 1065 | |
---|
952 | 1066 | testvect.set(from); |
---|
953 | 1067 | testvect.sub(fromto.from); |
---|
| 1068 | + |
---|
| 1069 | + testvect.y = 0; // PATCH |
---|
954 | 1070 | |
---|
955 | 1071 | int factor = 1; |
---|
956 | 1072 | |
---|
.. | .. |
---|
1186 | 1302 | |
---|
1187 | 1303 | void SetPosition(Object3D sourcenode, cVector floor, long floorid, cVector centroid) |
---|
1188 | 1304 | { |
---|
| 1305 | + assert(false); |
---|
1189 | 1306 | //assert(CameraPane.drawMode == CameraPane.SHADOW); |
---|
1190 | 1307 | |
---|
1191 | 1308 | Object3D transformnode = new Object3D(); |
---|
.. | .. |
---|
1389 | 1506 | groundid = floorid; |
---|
1390 | 1507 | |
---|
1391 | 1508 | // green |
---|
1392 | | - CameraPane.debugpoint.toParent[3][0] = groundx; |
---|
1393 | | - CameraPane.debugpoint.toParent[3][1] = floor.y; |
---|
1394 | | - CameraPane.debugpoint.toParent[3][2] = groundz; |
---|
| 1509 | + CameraPane.debugpointG.toParent[3][0] = groundx; |
---|
| 1510 | + CameraPane.debugpointG.toParent[3][1] = floor.y; |
---|
| 1511 | + CameraPane.debugpointG.toParent[3][2] = groundz; |
---|
1395 | 1512 | |
---|
1396 | 1513 | if (true) // slow && stepout && onein) |
---|
1397 | 1514 | { |
---|
.. | .. |
---|
1468 | 1585 | |
---|
1469 | 1586 | // System.out.println("Allo " + sourcenode); |
---|
1470 | 1587 | // purple |
---|
1471 | | - CameraPane.debugpoint2.toParent[3][0] = floor.x;// + posx; |
---|
1472 | | - CameraPane.debugpoint2.toParent[3][1] = ground; // floor.y;// + sourcenode.parent.toParent[3][1]; |
---|
1473 | | - CameraPane.debugpoint2.toParent[3][2] = floor.z;// + posz; |
---|
| 1588 | + CameraPane.debugpointP.toParent[3][0] = floor.x;// + posx; |
---|
| 1589 | + CameraPane.debugpointP.toParent[3][1] = ground; // floor.y;// + sourcenode.parent.toParent[3][1]; |
---|
| 1590 | + CameraPane.debugpointP.toParent[3][2] = floor.z;// + posz; |
---|
1474 | 1591 | |
---|
1475 | 1592 | |
---|
1476 | 1593 | if (false) // dist2 > 0.1) |
---|
.. | .. |
---|
1536 | 1653 | this.get(0).TransformToWorld(v0); |
---|
1537 | 1654 | |
---|
1538 | 1655 | // cyan |
---|
1539 | | - CameraPane.debugpoint3.toParent[3][0] = v0.x; |
---|
1540 | | - CameraPane.debugpoint3.toParent[3][1] = ground; |
---|
1541 | | - CameraPane.debugpoint3.toParent[3][2] = v0.z; |
---|
| 1656 | + CameraPane.debugpointC.toParent[3][0] = v0.x; |
---|
| 1657 | + CameraPane.debugpointC.toParent[3][1] = ground; |
---|
| 1658 | + CameraPane.debugpointC.toParent[3][2] = v0.z; |
---|
1542 | 1659 | |
---|
1543 | 1660 | LA.matConcat(sourcenode.toParent, transformnode.toParent, sourcenode.toParent); |
---|
1544 | 1661 | LA.matInvert(sourcenode.toParent, sourcenode.fromParent); |
---|
.. | .. |
---|
1548 | 1665 | this.get(0).TransformToWorld(v0); |
---|
1549 | 1666 | |
---|
1550 | 1667 | // red |
---|
1551 | | - CameraPane.debugpoint4.toParent[3][0] = v0.x; |
---|
1552 | | - CameraPane.debugpoint4.toParent[3][1] = ground; |
---|
1553 | | - CameraPane.debugpoint4.toParent[3][2] = v0.z; |
---|
| 1668 | + CameraPane.debugpointR.toParent[3][0] = v0.x; |
---|
| 1669 | + CameraPane.debugpointR.toParent[3][1] = ground; |
---|
| 1670 | + CameraPane.debugpointR.toParent[3][2] = v0.z; |
---|
1554 | 1671 | } |
---|
1555 | 1672 | } |
---|
1556 | 1673 | |
---|
.. | .. |
---|
1590 | 1707 | |
---|
1591 | 1708 | if (goal != null) |
---|
1592 | 1709 | { |
---|
1593 | | - System.err.println("GOAL change (" + sourcenode + "): " + goal + " (was " + goalx + ", " + goalz + ")"); |
---|
| 1710 | + System.err.println("GOAL change (" + sourcenode + "): " + goal + " (was " + goalposx + ", " + goalposz + ")"); |
---|
1594 | 1711 | //sourcenode.parent.parent.Dump(); |
---|
1595 | | - goalx = goal.x; |
---|
1596 | | - goalz = goal.z; |
---|
1597 | | - targetx = targetz = 0; |
---|
| 1712 | + goalposx = goal.x; |
---|
| 1713 | + goalposz = goal.z; |
---|
| 1714 | + targetdirx = targetdirz = 0; |
---|
1598 | 1715 | |
---|
1599 | 1716 | followpath = true; |
---|
1600 | 1717 | } |
---|
.. | .. |
---|
1645 | 1762 | // } |
---|
1646 | 1763 | if (false) // !uselast) |
---|
1647 | 1764 | { |
---|
1648 | | - CameraPane.debugpoint.toParent[3][0] = dst.x; |
---|
1649 | | - CameraPane.debugpoint.toParent[3][1] = dst.y; |
---|
1650 | | - CameraPane.debugpoint.toParent[3][2] = dst.z; |
---|
| 1765 | + CameraPane.debugpointG.toParent[3][0] = dst.x; |
---|
| 1766 | + CameraPane.debugpointG.toParent[3][1] = dst.y; |
---|
| 1767 | + CameraPane.debugpointG.toParent[3][2] = dst.z; |
---|
1651 | 1768 | } |
---|
1652 | 1769 | } |
---|
1653 | 1770 | |
---|
1654 | | - if (goalx != 0 || goalz != 0) // TODO |
---|
| 1771 | + if (goalposx != 0 || goalposz != 0) // TODO |
---|
1655 | 1772 | { |
---|
1656 | 1773 | // overwrite speaker orientation |
---|
1657 | | - dst.set(goalx,0,goalz); |
---|
| 1774 | + dst.set(goalposx,0,goalposz); |
---|
1658 | 1775 | if (sourcenode.parent != null) // july 2014 |
---|
1659 | 1776 | sourcenode.parent. |
---|
1660 | 1777 | TransformToLocal(dst); |
---|
.. | .. |
---|
1706 | 1823 | // mars 2014 |
---|
1707 | 1824 | if (false) // goalx != 0 || goalz != 0) |
---|
1708 | 1825 | { |
---|
1709 | | - targetx = dst.x - src.x; |
---|
1710 | | - targetz = dst.z - src.z; |
---|
| 1826 | + targetdirx = dst.x - src.x; |
---|
| 1827 | + targetdirz = dst.z - src.z; |
---|
1711 | 1828 | |
---|
1712 | | - if (Math.abs(targetx) > 0.1 || Math.abs(targetz) > 0.1) |
---|
| 1829 | + if (Math.abs(targetdirx) > 0.1 || Math.abs(targetdirz) > 0.1) |
---|
1713 | 1830 | { |
---|
1714 | 1831 | // far enough from goal. keep the goal position. |
---|
1715 | | - targetx = 0; |
---|
1716 | | - targetz = 0; |
---|
| 1832 | + targetdirx = 0; |
---|
| 1833 | + targetdirz = 0; |
---|
1717 | 1834 | } |
---|
1718 | 1835 | else |
---|
1719 | 1836 | { |
---|
1720 | 1837 | // too close to goal. switch to target direction instead. |
---|
1721 | | - goalx = 0; |
---|
1722 | | - goalz = 0; |
---|
| 1838 | + goalposx = 0; |
---|
| 1839 | + goalposz = 0; |
---|
1723 | 1840 | } |
---|
1724 | 1841 | } |
---|
1725 | 1842 | |
---|
1726 | 1843 | //sourcenode.getCentroid(src, true); |
---|
1727 | 1844 | |
---|
1728 | | - if (speakernode == sourcenode && goalx == 0 && goalz == 0) |
---|
| 1845 | + if (speakernode == sourcenode && goalposx == 0 && goalposz == 0) |
---|
1729 | 1846 | { |
---|
1730 | 1847 | if (ScriptNode.lastspeaker != null) |
---|
1731 | 1848 | new Exception().printStackTrace(); |
---|
.. | .. |
---|
1734 | 1851 | |
---|
1735 | 1852 | // LA.xformPos(src, fromParent, src); |
---|
1736 | 1853 | |
---|
1737 | | - if ((ScriptNode.speaker != null && CameraPane.SPEAKERMOCAP || goalx != 0 || goalz != 0) && targetx == 0 && targetz == 0) |
---|
| 1854 | + if ((ScriptNode.speaker != null && CameraPane.SPEAKERMOCAP || goalposx != 0 || goalposz != 0) && targetdirx == 0 && targetdirz == 0) |
---|
1738 | 1855 | dst.sub(src); |
---|
1739 | 1856 | else |
---|
1740 | 1857 | // vector mode |
---|
1741 | 1858 | { |
---|
1742 | | - dst.x = targetx; |
---|
1743 | | - dst.z = targetz; |
---|
| 1859 | + dst.x = targetdirx; |
---|
| 1860 | + dst.z = targetdirz; |
---|
1744 | 1861 | |
---|
1745 | 1862 | // TEST TARGET |
---|
1746 | 1863 | // dst.x = CameraPane.selectedpoint.toParent[3][0]; |
---|
.. | .. |
---|
2188 | 2305 | toVector.x = LA.cos(to); |
---|
2189 | 2306 | toVector.y = LA.sin(to); |
---|
2190 | 2307 | |
---|
| 2308 | + double fromA = Math.atan2(fromVector.y, fromVector.x); |
---|
| 2309 | + double toA = Math.atan2(toVector.y, toVector.x); |
---|
| 2310 | + |
---|
2191 | 2311 | Vector2d currentVector = Slerp(fromVector, toVector, step); |
---|
2192 | 2312 | |
---|
2193 | | - return Math.atan2(currentVector.y, currentVector.x); |
---|
| 2313 | + double angle = Math.atan2(currentVector.y, currentVector.x); |
---|
| 2314 | + |
---|
| 2315 | + double angle2 = (1-step) * fromA + step * toA; |
---|
| 2316 | + |
---|
| 2317 | + return angle; |
---|
2194 | 2318 | } |
---|
2195 | 2319 | |
---|
2196 | 2320 | public static Vector2d Slerp(Vector2d from, Vector2d to, double step) |
---|
.. | .. |
---|
2242 | 2366 | { |
---|
2243 | 2367 | e.printStackTrace(); |
---|
2244 | 2368 | } |
---|
| 2369 | + |
---|
| 2370 | + SetHipOrientation(); |
---|
2245 | 2371 | |
---|
2246 | 2372 | if (true) |
---|
2247 | 2373 | return; |
---|
.. | .. |
---|
2670 | 2796 | // set rotation |
---|
2671 | 2797 | //if (bone._rotationEnabled) |
---|
2672 | 2798 | if (//frame > 0 && |
---|
2673 | | - !bone.skipmocap //&& |
---|
2674 | | - //!bone.name.contains("head") && |
---|
| 2799 | + !bone.skipmocap && |
---|
| 2800 | + !bone.name.contains("head") // && |
---|
2675 | 2801 | // !bone.name.contains("rFoot") && |
---|
2676 | 2802 | // !bone.name.contains("lFoot") && |
---|
2677 | 2803 | // !bone.name.contains("Pinky") && |
---|
.. | .. |
---|
3096 | 3222 | // LA.matIdentity(rot.fromParent); |
---|
3097 | 3223 | |
---|
3098 | 3224 | // july 2014 |
---|
3099 | | - goalx = goalz = 0; |
---|
3100 | | - targetx = targetz = 0; |
---|
| 3225 | +// goalx = goalz = 0; |
---|
| 3226 | + targetdirx = targetdirz = 0; |
---|
3101 | 3227 | |
---|
3102 | 3228 | //SetPositionDelta(true, true, true, false); |
---|
3103 | 3229 | // LoadData(); |
---|