Commit 070e33f
committed
ArcadePhysics.overlap has been updated so that the Body.overlapX/Y properties are set to the amount the two bodies overlapped by. Previously they were zero and only populated during the separation phase, but now the data is available for just overlap checks as well. You can then use these values in your ovrelap callback as required - note that they are changed for every check, so a Sprite overlap tested against 10 other sprites will have the overlapX/Y values updated 10 times in a single collision pass, so you can only safely use the values in the callback (phaserjs#641)
1 parent 6784c3a commit 070e33f
2 files changed
Lines changed: 19 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
784 | 784 | | |
785 | 785 | | |
786 | 786 | | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | 787 | | |
| 788 | + | |
794 | 789 | | |
795 | 790 | | |
796 | 791 | | |
| |||
801 | 796 | | |
802 | 797 | | |
803 | 798 | | |
804 | | - | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
805 | 808 | | |
806 | 809 | | |
807 | 810 | | |
| |||
905 | 908 | | |
906 | 909 | | |
907 | 910 | | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
908 | 915 | | |
909 | 916 | | |
910 | 917 | | |
911 | | - | |
912 | | - | |
913 | | - | |
914 | 918 | | |
915 | 919 | | |
916 | 920 | | |
| |||
1020 | 1024 | | |
1021 | 1025 | | |
1022 | 1026 | | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
1023 | 1031 | | |
1024 | 1032 | | |
1025 | 1033 | | |
1026 | | - | |
1027 | | - | |
1028 | | - | |
1029 | 1034 | | |
1030 | 1035 | | |
1031 | 1036 | | |
| |||
0 commit comments