Commit 7468ecbc authored by Vũ Gia Vương's avatar Vũ Gia Vương

fix hammer , collider fragment

parent 99f7e199
......@@ -2967,12 +2967,12 @@
},
{
"__type__": "cc.Vec2",
"x": -12.3,
"y": -73.5
"x": -12.2,
"y": -73
},
{
"__type__": "cc.Vec2",
"x": 78,
"x": 77.6,
"y": -73.6
},
{
......@@ -2982,43 +2982,43 @@
},
{
"__type__": "cc.Vec2",
"x": 155.1,
"y": 55.6
"x": 154.61,
"y": 55.99
},
{
"__type__": "cc.Vec2",
"x": 168.2,
"y": 75.7
"x": 168.01,
"y": 75.8
},
{
"__type__": "cc.Vec2",
"x": 158.9,
"y": 112.8
"x": 158.71,
"y": 112.61
},
{
"__type__": "cc.Vec2",
"x": 81.9,
"y": 144.8
"x": 81.8,
"y": 144.51
},
{
"__type__": "cc.Vec2",
"x": 60.7,
"x": 60.89,
"y": 124.4
},
{
"__type__": "cc.Vec2",
"x": 51.5,
"y": 87.9
"x": 51.69,
"y": 87.8
},
{
"__type__": "cc.Vec2",
"x": -5.5,
"y": 43.9
"x": -5.31,
"y": 43.71
},
{
"__type__": "cc.Vec2",
"x": -50.4,
"y": 56.2
"x": -50.98,
"y": 55.71
},
{
"__type__": "cc.Vec2",
......@@ -3032,8 +3032,13 @@
},
{
"__type__": "cc.Vec2",
"x": -170.4,
"y": -49
"x": -168.9,
"y": -49.8
},
{
"__type__": "cc.Vec2",
"x": -98.1,
"y": -86.1
}
],
"_id": "79mvxrrW1O0oNGfg5khgek"
......@@ -3132,13 +3137,13 @@
},
{
"__type__": "cc.Vec2",
"x": 119.1,
"y": 5.7
"x": 118.2,
"y": 6.4
},
{
"__type__": "cc.Vec2",
"x": 143,
"y": 60.2
"x": 137.6,
"y": 51.2
},
{
"__type__": "cc.Vec2",
......@@ -3152,8 +3157,8 @@
},
{
"__type__": "cc.Vec2",
"x": -146.8,
"y": -90.5
"x": -138.3,
"y": -92.4
},
{
"__type__": "cc.Vec2",
......@@ -3530,8 +3535,8 @@
},
{
"__type__": "cc.Vec2",
"x": 41.2,
"y": -97.2
"x": 41.4,
"y": -97
},
{
"__type__": "cc.Vec2",
......@@ -3540,8 +3545,8 @@
},
{
"__type__": "cc.Vec2",
"x": 172.6,
"y": -67.6
"x": 172.2,
"y": -66.3
},
{
"__type__": "cc.Vec2",
......@@ -3560,13 +3565,13 @@
},
{
"__type__": "cc.Vec2",
"x": -148.6,
"y": 78.4
"x": -148.5,
"y": 77.7
},
{
"__type__": "cc.Vec2",
"x": -173,
"y": 54.2
"x": -172.6,
"y": 54.4
},
{
"__type__": "cc.Vec2",
......@@ -4026,17 +4031,17 @@
{
"__type__": "cc.Vec2",
"x": -32.8,
"y": -53.6
"y": -52.8
},
{
"__type__": "cc.Vec2",
"x": 55.1,
"y": -74.7
"y": -74
},
{
"__type__": "cc.Vec2",
"x": 93.1,
"y": -122.5
"x": 93.2,
"y": -121.5
},
{
"__type__": "cc.Vec2",
......@@ -4045,43 +4050,53 @@
},
{
"__type__": "cc.Vec2",
"x": 87.3,
"y": -38.7
"x": 86.5,
"y": -39.8
},
{
"__type__": "cc.Vec2",
"x": 34.2,
"y": 43
"x": 66.2,
"y": -11.9
},
{
"__type__": "cc.Vec2",
"x": -8.5,
"y": 51.5
"x": 33.9,
"y": 42.54
},
{
"__type__": "cc.Vec2",
"x": -37.3,
"y": 105.6
"x": -9.1,
"y": 50.7
},
{
"__type__": "cc.Vec2",
"x": -110.2,
"y": 127.8
"x": -37.7,
"y": 104.8
},
{
"__type__": "cc.Vec2",
"x": -139.3,
"x": -110.3,
"y": 126.8
},
{
"__type__": "cc.Vec2",
"x": -138.78,
"y": 26.5
},
{
"__type__": "cc.Vec2",
"x": -113.8,
"y": -32.8
"x": -113.52,
"y": -32.94
},
{
"__type__": "cc.Vec2",
"x": -117.4,
"y": -37.5
"x": -117.26,
"y": -36.73
},
{
"__type__": "cc.Vec2",
"x": -100,
"y": -51.1
}
],
"_id": "dfUZAuiFRHaaZifPZotCuG"
......@@ -4166,22 +4181,22 @@
{
"__type__": "cc.Vec2",
"x": -67.1,
"y": -6.3
"y": -5.5
},
{
"__type__": "cc.Vec2",
"x": -25.4,
"y": -15.2
"x": -24.8,
"y": -14.6
},
{
"__type__": "cc.Vec2",
"x": 27.9,
"y": -96.9
"x": 28.4,
"y": -96.3
},
{
"__type__": "cc.Vec2",
"x": 79.5,
"y": -109.1
"y": -108.6
},
{
"__type__": "cc.Vec2",
......@@ -4195,27 +4210,27 @@
},
{
"__type__": "cc.Vec2",
"x": 44.6,
"y": 107
"x": 44.3,
"y": 106.6
},
{
"__type__": "cc.Vec2",
"x": 21.6,
"y": 75.6
"x": 21.3,
"y": 75.3
},
{
"__type__": "cc.Vec2",
"x": -89.2,
"y": 75.8
"x": -89.3,
"y": 75.4
},
{
"__type__": "cc.Vec2",
"x": -121.9,
"y": 110.7
"y": 110.4
},
{
"__type__": "cc.Vec2",
"x": -110.4,
"x": -110,
"y": 73.8
}
],
......@@ -4665,8 +4680,8 @@
"points": [
{
"__type__": "cc.Vec2",
"x": -98.9,
"y": -78.5
"x": -99.5,
"y": -79.2
},
{
"__type__": "cc.Vec2",
......@@ -4675,13 +4690,13 @@
},
{
"__type__": "cc.Vec2",
"x": 31.7,
"y": -123.5
"x": 31.21,
"y": -122.84
},
{
"__type__": "cc.Vec2",
"x": 35.8,
"y": -119.6
"x": 34.81,
"y": -119.02
},
{
"__type__": "cc.Vec2",
......@@ -4695,13 +4710,13 @@
},
{
"__type__": "cc.Vec2",
"x": 110.7,
"y": 19.4
"x": 108.9,
"y": 19.7
},
{
"__type__": "cc.Vec2",
"x": 96.8,
"y": 47.9
"x": 96.2,
"y": 47.8
},
{
"__type__": "cc.Vec2",
......@@ -4710,13 +4725,13 @@
},
{
"__type__": "cc.Vec2",
"x": 58.2,
"y": 113.1
"x": 58,
"y": 112.4
},
{
"__type__": "cc.Vec2",
"x": -2.4,
"y": 111.5
"y": 110.6
},
{
"__type__": "cc.Vec2",
......@@ -4725,18 +4740,23 @@
},
{
"__type__": "cc.Vec2",
"x": -20.5,
"y": 109.2
"x": -20.2,
"y": 109
},
{
"__type__": "cc.Vec2",
"x": -110.48,
"y": 45.56
},
{
"__type__": "cc.Vec2",
"x": -110.6,
"y": 45.8
"x": -98.4,
"y": -12.5
},
{
"__type__": "cc.Vec2",
"x": -90.7,
"y": -73.9
"x": -89.9,
"y": -73.6
}
],
"_id": "e8fb+xiEBPApeeB08wcyGC"
......@@ -4820,38 +4840,48 @@
"points": [
{
"__type__": "cc.Vec2",
"x": -82.9,
"y": -68.7
"x": -83.59,
"y": -66.72
},
{
"__type__": "cc.Vec2",
"x": 21.1,
"y": -56.4
"x": -58.3,
"y": -59.8
},
{
"__type__": "cc.Vec2",
"x": 122.8,
"y": -0.9
"x": 19.8,
"y": -56
},
{
"__type__": "cc.Vec2",
"x": 122.5,
"y": -0.6
},
{
"__type__": "cc.Vec2",
"x": 115.3,
"y": 52.1
"y": 51.95
},
{
"__type__": "cc.Vec2",
"x": 27,
"y": 52.7
"x": 26.84,
"y": 52.45
},
{
"__type__": "cc.Vec2",
"x": -0.1,
"y": 3.4
"x": 0.06,
"y": 2.41
},
{
"__type__": "cc.Vec2",
"x": -131.8,
"y": 75.4
"x": -61.6,
"y": 39.2
},
{
"__type__": "cc.Vec2",
"x": -130.73,
"y": 75.11
},
{
"__type__": "cc.Vec2",
......@@ -5218,23 +5248,28 @@
"points": [
{
"__type__": "cc.Vec2",
"x": -58.1,
"y": -88.7
"x": -58.5,
"y": -87.9
},
{
"__type__": "cc.Vec2",
"x": -19.8,
"y": -57.1
"x": -20.2,
"y": -56
},
{
"__type__": "cc.Vec2",
"x": 60.2,
"y": -55.3
"x": 59.4,
"y": -54.7
},
{
"__type__": "cc.Vec2",
"x": 73.6,
"y": -15.6
"x": 73,
"y": -15
},
{
"__type__": "cc.Vec2",
"x": 141.2,
"y": 6.3
},
{
"__type__": "cc.Vec2",
......@@ -5243,38 +5278,38 @@
},
{
"__type__": "cc.Vec2",
"x": 166.3,
"y": 30
"x": 165.2,
"y": 29.4
},
{
"__type__": "cc.Vec2",
"x": 105,
"y": 83.8
"x": 103.4,
"y": 83
},
{
"__type__": "cc.Vec2",
"x": 16.3,
"y": 89.7
"y": 88.6
},
{
"__type__": "cc.Vec2",
"x": -74.7,
"y": 39.6
"x": -74.5,
"y": 39
},
{
"__type__": "cc.Vec2",
"x": -155.1,
"y": 35.9
"x": -155.3,
"y": 35.4
},
{
"__type__": "cc.Vec2",
"x": -187,
"y": 26.9
"x": -186.9,
"y": 26.2
},
{
"__type__": "cc.Vec2",
"x": -121.1,
"y": -75.7
"x": -123,
"y": -71.2
}
],
"_id": "94iB2JXGBJC5Ydofx4LAfT"
......@@ -5451,43 +5486,48 @@
},
{
"__type__": "cc.Vec2",
"x": 210.1,
"y": -1.3
"x": 208.3,
"y": -1.8
},
{
"__type__": "cc.Vec2",
"x": 170.2,
"y": 47.5
"x": 169.4,
"y": 47.2
},
{
"__type__": "cc.Vec2",
"x": 83.3,
"y": 68.5
"x": 82.5,
"y": 68
},
{
"__type__": "cc.Vec2",
"x": -8,
"y": 45.4
"x": 27.2,
"y": 47.3
},
{
"__type__": "cc.Vec2",
"x": -77,
"y": 23.4
"x": -4.8,
"y": 44.9
},
{
"__type__": "cc.Vec2",
"x": -89.4,
"y": -15.6
"x": -76.2,
"y": 22.9
},
{
"__type__": "cc.Vec2",
"x": -88.9,
"y": -16.1
},
{
"__type__": "cc.Vec2",
"x": -170.6,
"y": -17.2
"x": -170.1,
"y": -17.5
},
{
"__type__": "cc.Vec2",
"x": -209.5,
"y": -50.7
"x": -207.9,
"y": -50.4
}
],
"_id": "deRBw/8d9KT5+8KuKjJlaa"
......
......@@ -21,6 +21,7 @@ export default class BreakingBottleController extends cc.Component {
onLoad() {
return;
cc.director.getPhysicsManager().enabled = true;
// cc.director.getPhysicsManager().debugDrawFlags = cc.PhysicsManager.DrawBits.e_aabbBit |
// cc.PhysicsManager.DrawBits.e_jointBit |
......
......@@ -54,7 +54,6 @@ export default class FragmentJarController extends cc.Component {
if (this._physicsColliderFragmentLink) {
const posFragmentLink = point.clone().subtract(cc.v2(this.fragmentLink.position.x, this.fragmentLink.position.y));
isInsideFragmentLink = cc.Intersection.pointInPolygon(posFragmentLink, this._physicsColliderFragmentLink.points);
console.log('isInside', isInside, isInsideFragmentLink, this.node.name, this._physicsColliderFragmentLink.points.length)
}
if (!isInside && !isInsideFragmentLink) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment