diff --git a/Assets/Scenes/Level2.shade b/Assets/Scenes/Level2.shade index d236103c..a92e5375 100644 --- a/Assets/Scenes/Level2.shade +++ b/Assets/Scenes/Level2.shade @@ -83,7 +83,6 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -137,7 +136,6 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -191,7 +189,6 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -240,12 +237,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -294,12 +288,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -348,12 +339,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -402,12 +390,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -456,12 +441,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -514,12 +496,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -558,12 +537,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -602,12 +578,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -646,12 +619,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -690,12 +660,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -744,12 +711,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -798,12 +762,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -852,12 +813,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -906,12 +864,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -960,12 +915,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1014,12 +966,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1068,12 +1017,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1122,12 +1068,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1176,12 +1119,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1230,12 +1170,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1284,12 +1221,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1338,12 +1272,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1392,12 +1323,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1446,12 +1374,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1500,12 +1425,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1554,12 +1476,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1608,12 +1527,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1662,12 +1578,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1716,12 +1629,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1774,12 +1684,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1828,12 +1735,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1882,12 +1786,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1936,12 +1837,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -1990,12 +1888,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2049,7 +1944,6 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2103,7 +1997,6 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2157,7 +2050,6 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: false Freeze Position X: false @@ -2210,12 +2102,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: true Sleeping Enabled: false Freeze Position X: false @@ -2264,12 +2153,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2318,12 +2204,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2372,12 +2255,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2426,12 +2306,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2480,12 +2357,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2538,12 +2412,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2592,12 +2463,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2646,12 +2514,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2700,12 +2565,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2754,12 +2616,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2813,7 +2672,6 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2866,12 +2724,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2910,12 +2765,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2954,12 +2806,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -2998,12 +2847,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -3042,12 +2888,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -3100,12 +2943,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -3144,12 +2984,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -3188,12 +3025,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -3232,12 +3066,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -3276,12 +3107,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -3334,12 +3162,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -3378,12 +3203,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -3422,12 +3244,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -3466,12 +3285,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -3512,12 +3328,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: true Sleeping Enabled: true Freeze Position X: false @@ -3577,12 +3390,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: true Sleeping Enabled: true Freeze Position X: false @@ -3681,7 +3491,6 @@ Text: My name is Brandon. Font: 174412429 Color: {x: 1, y: 1, z: 1, w: 1} - Text Size: {x: 1, y: 1, z: 1} IsActive: true UI Component: Canvas ID: 199 @@ -3723,7 +3532,6 @@ Text: My name is Brandon. Font: 176667660 Color: {x: 1, y: 1, z: 1, w: 1} - Text Size: {x: 1, y: 1, z: 1} IsActive: true UI Component: Canvas ID: 199 @@ -3745,7 +3553,6 @@ Text: X2 Font: 174412429 Color: {x: 1, y: 1, z: 1, w: 1} - Text Size: {x: 1, y: 1, z: 1} IsActive: true UI Component: Canvas ID: 199 @@ -3800,12 +3607,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: false - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -3986,12 +3790,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4034,12 +3835,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4078,12 +3876,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4122,12 +3917,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4166,12 +3958,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4210,12 +3999,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4258,12 +4044,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4302,12 +4085,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4346,12 +4126,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4390,12 +4167,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4434,12 +4208,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4482,12 +4253,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4526,12 +4294,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4570,12 +4335,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4614,12 +4376,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4658,12 +4417,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4706,12 +4462,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4750,12 +4503,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4794,12 +4544,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4838,12 +4585,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4882,12 +4626,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4930,12 +4671,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -4974,12 +4712,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5018,12 +4753,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5062,12 +4794,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5106,12 +4835,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5154,12 +4880,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5198,12 +4921,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5242,12 +4962,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5286,12 +5003,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5330,12 +5044,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5378,12 +5089,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5422,12 +5130,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5466,12 +5171,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5510,12 +5212,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5554,12 +5253,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5602,12 +5298,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5646,12 +5339,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5690,12 +5380,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5734,12 +5421,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5778,12 +5462,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5826,12 +5507,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5870,12 +5548,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5914,12 +5589,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -5958,12 +5630,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -6002,12 +5671,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -6050,12 +5716,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -6094,12 +5757,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -6138,12 +5798,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -6182,12 +5839,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -6309,12 +5963,9 @@ IsActive: true RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: true Sleeping Enabled: true Freeze Position X: false @@ -6364,12 +6015,9 @@ IsActive: false RigidBody Component: Type: Dynamic - Auto Mass: false - Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -6551,7 +6199,6 @@ Text: Game Pause Font: 176667660 Color: {x: 1, y: 1, z: 1, w: 1} - Text Size: {x: 1, y: 1, z: 1} IsActive: false UI Component: Canvas ID: 10 diff --git a/Assets/Scenes/PhysicsTest.shade b/Assets/Scenes/PhysicsTest.shade index 20903809..7966307c 100644 --- a/Assets/Scenes/PhysicsTest.shade +++ b/Assets/Scenes/PhysicsTest.shade @@ -10,9 +10,12 @@ IsActive: true RigidBody Component: Type: Dynamic + Auto Mass: false + Mass: 1 Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true + Gravity Scale: 1 Interpolate: false Sleeping Enabled: true Freeze Position X: false @@ -35,10 +38,6 @@ Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true Scripts: - - Type: PhysicsTestObj - Enabled: true - forceAmount: 50 - torqueAmount: 500 - Type: CollisionTest Enabled: true - EID: 1 @@ -75,10 +74,10 @@ Yaw: 0 Roll: 0 Width: 1920 - Height: 1080 Near: 0.00999999978 Far: 10000 Perspective: true + FOV: 90 IsActive: true Scripts: ~ - EID: 65539 @@ -173,43 +172,6 @@ Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true Scripts: ~ -- EID: 7 - Name: Default - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 0, y: 0, z: 3} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1, y: 1, z: 1} - IsActive: true - RigidBody Component: - Type: Dynamic - Drag: 0.00999999978 - Angular Drag: 0.100000001 - Use Gravity: true - Interpolate: true - Sleeping Enabled: true - Freeze Position X: false - Freeze Position Y: false - Freeze Position Z: false - Freeze Rotation X: false - Freeze Rotation Y: false - Freeze Rotation Z: false - IsActive: true - Collider Component: - Colliders: - - Is Trigger: false - Collision Tag: 1 - Type: Box - Half Extents: {x: 1, y: 1, z: 1} - Friction: 0.400000006 - Bounciness: 0 - Density: 1 - Position Offset: {x: 0, y: 0, z: 0} - Rotation Offset: {x: 0, y: 0, z: 0} - IsActive: true - Scripts: ~ - EID: 8 Name: Target IsActive: true diff --git a/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafChase.cs b/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafChase.cs index 6085c974..d82d399a 100644 --- a/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafChase.cs +++ b/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafChase.cs @@ -1,4 +1,4 @@ -/********************************************************************* +/********************************************************************* * \file LeafChase.cs * \author Ryan Wang Nian Jing * \brief Leaf node implementation for AI chasing the player diff --git a/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafPatrol.cs b/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafPatrol.cs index 6199bd19..14c95fc6 100644 --- a/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafPatrol.cs +++ b/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafPatrol.cs @@ -1,4 +1,4 @@ -/********************************************************************* +/********************************************************************* * \file LeafPatrol.cs * \author Ryan Wang Nian Jing * \brief Leaf node implementation for patrolling AI diff --git a/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafSearch.cs b/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafSearch.cs index c433f912..6a69cbc4 100644 --- a/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafSearch.cs +++ b/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafSearch.cs @@ -1,4 +1,4 @@ -/********************************************************************* +/********************************************************************* * \file LeafSearch.cs * \author Ryan Wang Nian Jing * \brief Leaf node implementation for AI searching for player diff --git a/Assets/Scripts/Tests/PhysicsTestObj.cs b/Assets/Scripts/Tests/PhysicsTestObj.cs index e9c5c310..f4c6415e 100644 --- a/Assets/Scripts/Tests/PhysicsTestObj.cs +++ b/Assets/Scripts/Tests/PhysicsTestObj.cs @@ -1,4 +1,4 @@ -using SHADE; +using SHADE; using System; using System.Collections.Generic; using static Item; @@ -65,37 +65,8 @@ public class PhysicsTestObj : Script }; public float forceAmount = 50.0f; - public float torqueAmount = 25.0f; + public float torqueAmount = 500.0f; - protected override void onTriggerEnter(CollisionInfo info) - { - Debug.Log("Trigger Enter"); - } - - protected override void onTriggerStay(CollisionInfo info) - { - Debug.Log("Trigger Stay"); - } - - protected override void onTriggerExit(CollisionInfo info) - { - Debug.Log("Trigger Exit"); - } - - protected override void onCollisionEnter(CollisionInfo info) - { - Debug.Log("Collision Enter"); - } - - protected override void onCollisionStay(CollisionInfo info) - { - Debug.Log("Collision Stay"); - } - - protected override void onCollisionExit(CollisionInfo info) - { - Debug.Log("Collision Exit"); - } protected override void awake() { tf = GetComponent(); diff --git a/Assets/Scripts/UI/SC_ChangeSceneButton.cs b/Assets/Scripts/UI/SC_ChangeSceneButton.cs index 09e4cf5b..c1ab681b 100644 --- a/Assets/Scripts/UI/SC_ChangeSceneButton.cs +++ b/Assets/Scripts/UI/SC_ChangeSceneButton.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Reflection.Metadata.Ecma335; using SHADE; using SHADE_Scripting.UI; diff --git a/Assets/Scripts/UI/SC_EndScene.cs b/Assets/Scripts/UI/SC_EndScene.cs index 7d00c334..9e8de4c5 100644 --- a/Assets/Scripts/UI/SC_EndScene.cs +++ b/Assets/Scripts/UI/SC_EndScene.cs @@ -1,4 +1,4 @@ -using System; +using System; using SHADE; using SHADE_Scripting.Audio; using SHADE_Scripting.UI; diff --git a/Assets/Scripts/UI/SC_MainMenu.cs b/Assets/Scripts/UI/SC_MainMenu.cs index 16c2d593..0e1aa957 100644 --- a/Assets/Scripts/UI/SC_MainMenu.cs +++ b/Assets/Scripts/UI/SC_MainMenu.cs @@ -1,4 +1,4 @@ -using System; +using System; using SHADE; using SHADE_Scripting.Audio; using SHADE_Scripting.UI; diff --git a/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp b/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp index f6a78bc5..ae6e79eb 100644 --- a/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp +++ b/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp @@ -436,24 +436,15 @@ namespace SHADE if (ImGui::Selectable("Box Collider")) { - auto* compositeCollider = dynamic_cast(component->GetCollider()); + auto* compositeCollider = reinterpret_cast(component->GetCollider()); compositeCollider->AddBoxCollisionShape(SHVec3::One); } if (ImGui::Selectable("Sphere Collider")) { - auto* compositeCollider = dynamic_cast(component->GetCollider()); + auto* compositeCollider = reinterpret_cast(component->GetCollider()); compositeCollider->AddSphereCollisionShape(1.0f); } - //No idea why this doesn't work - //if (newColl > 0) - //{ - // auto newCollisionShape = component->GetCollisionShape(newColl); - // auto prevCollisionShapeInSeq = component->GetCollisionShape(newColl - 1); - // newCollisionShape.SetCollisionTag(SHCollisionTagMatrix::GetTag(prevCollisionShapeInSeq.GetCollisionTag().GetName())); - - //} - ImGui::EndMenu(); } } @@ -787,4 +778,4 @@ namespace SHADE ImGui::PopID(); } -} +} \ No newline at end of file diff --git a/SHADE_Engine/src/Math/SHRay.cpp b/SHADE_Engine/src/Math/SHRay.cpp index b4c66c09..c6268851 100644 --- a/SHADE_Engine/src/Math/SHRay.cpp +++ b/SHADE_Engine/src/Math/SHRay.cpp @@ -10,6 +10,8 @@ #include +#include + // Primary Header #include "SHRay.h" diff --git a/SHADE_Engine/src/Math/SHRay.h b/SHADE_Engine/src/Math/SHRay.h index 56599018..c4d8c9a5 100644 --- a/SHADE_Engine/src/Math/SHRay.h +++ b/SHADE_Engine/src/Math/SHRay.h @@ -13,8 +13,13 @@ // Project Headers #include "Vector/SHVec3.h" +/*-------------------------------------------------------------------------------------*/ +/* Forward Declarations */ +/*-------------------------------------------------------------------------------------*/ + namespace SHADE { + /*-----------------------------------------------------------------------------------*/ /* Type Definitions */ /*-----------------------------------------------------------------------------------*/ diff --git a/SHADE_Engine/src/Physics/Collision/Narrowphase/SHConvexVsConvex.cpp b/SHADE_Engine/src/Physics/Collision/Narrowphase/SHConvexVsConvex.cpp index 4d12b716..8c7ffc5e 100644 --- a/SHADE_Engine/src/Physics/Collision/Narrowphase/SHConvexVsConvex.cpp +++ b/SHADE_Engine/src/Physics/Collision/Narrowphase/SHConvexVsConvex.cpp @@ -47,8 +47,8 @@ namespace SHADE bool SHCollision::ConvexVsConvex(const SHCollisionShape& A, const SHCollisionShape& B) noexcept { - const SHConvexPolyhedron& POLY_A = dynamic_cast(A); - const SHConvexPolyhedron& POLY_B = dynamic_cast(B); + const SHConvexPolyhedron& POLY_A = reinterpret_cast(A); + const SHConvexPolyhedron& POLY_B = reinterpret_cast(B); const SHCollisionUtils::SHCollisionUtils::FaceQuery FACE_QUERY_A = queryFaceDirections(POLY_A, POLY_B); if (FACE_QUERY_A.bestDistance > 0.0f) @@ -70,8 +70,8 @@ namespace SHADE static constexpr float ABSOLUTE_TOLERANCE = 0.01f; static constexpr float RELATIVE_TOLERANCE = 0.95f; - const SHConvexPolyhedron& POLY_A = dynamic_cast(A); - const SHConvexPolyhedron& POLY_B = dynamic_cast(B); + const SHConvexPolyhedron& POLY_A = reinterpret_cast(A); + const SHConvexPolyhedron& POLY_B = reinterpret_cast(B); const SHCollisionUtils::ShapeTransform TF_A { POLY_A.GetWorldCentroid(), POLY_A.GetWorldOrientation() }; const SHCollisionUtils::ShapeTransform TF_B { POLY_B.GetWorldCentroid(), POLY_B.GetWorldOrientation() }; diff --git a/SHADE_Engine/src/Physics/Collision/Narrowphase/SHSphereVsConvex.cpp b/SHADE_Engine/src/Physics/Collision/Narrowphase/SHSphereVsConvex.cpp index 68217d8b..cb6e4a37 100644 --- a/SHADE_Engine/src/Physics/Collision/Narrowphase/SHSphereVsConvex.cpp +++ b/SHADE_Engine/src/Physics/Collision/Narrowphase/SHSphereVsConvex.cpp @@ -42,8 +42,8 @@ namespace SHADE bool SHCollision::SphereVsConvex(const SHCollisionShape& A, const SHCollisionShape& B) noexcept { - const SHSphere& SPHERE = dynamic_cast(A); - const SHConvexPolyhedron& POLYHEDRON = dynamic_cast(B); + const SHSphere& SPHERE = reinterpret_cast(A); + const SHConvexPolyhedron& POLYHEDRON = reinterpret_cast(B); const SHVec3 CENTER = SPHERE.Center; const float RADIUS = SPHERE.GetWorldRadius(); @@ -90,8 +90,8 @@ namespace SHADE { // Convert to underlying types // For the convex, we only need the convex polyhedron shape since the get vertex is pure virtual. - const SHSphere& SPHERE = dynamic_cast(A); - const SHConvexPolyhedron& POLY = dynamic_cast(B); + const SHSphere& SPHERE = reinterpret_cast(A); + const SHConvexPolyhedron& POLY = reinterpret_cast(B); const SHVec3 CENTER = SPHERE.Center; const float RADIUS = SPHERE.GetWorldRadius(); diff --git a/SHADE_Engine/src/Physics/Collision/Narrowphase/SHSphereVsSphere.cpp b/SHADE_Engine/src/Physics/Collision/Narrowphase/SHSphereVsSphere.cpp index caf974dc..cfd2bf16 100644 --- a/SHADE_Engine/src/Physics/Collision/Narrowphase/SHSphereVsSphere.cpp +++ b/SHADE_Engine/src/Physics/Collision/Narrowphase/SHSphereVsSphere.cpp @@ -26,8 +26,8 @@ namespace SHADE bool SHCollision::SphereVsSphere(const SHCollisionShape& A, const SHCollisionShape& B) noexcept { - const SHSphere& SPHERE_A = dynamic_cast(A); - const SHSphere& SPHERE_B = dynamic_cast(B); + const SHSphere& SPHERE_A = reinterpret_cast(A); + const SHSphere& SPHERE_B = reinterpret_cast(B); const SHVec3 CENTER_A = SPHERE_A.Center; const float RADIUS_A = SPHERE_A.Radius; @@ -48,8 +48,8 @@ namespace SHADE bool SHCollision::SphereVsSphere(SHManifold& manifold, const SHCollisionShape& A, const SHCollisionShape& B) noexcept { // Convert to underlying types - const SHSphere& SPHERE_A = dynamic_cast(A); - const SHSphere& SPHERE_B = dynamic_cast(B); + const SHSphere& SPHERE_A = reinterpret_cast(A); + const SHSphere& SPHERE_B = reinterpret_cast(B); const SHVec3 CENTER_A = SPHERE_A.Center; const float RADIUS_A = SPHERE_A.Radius; diff --git a/SHADE_Engine/src/Physics/Collision/SHCollider.cpp b/SHADE_Engine/src/Physics/Collision/SHCollider.cpp index 2e7cc3c6..994a61ed 100644 --- a/SHADE_Engine/src/Physics/Collision/SHCollider.cpp +++ b/SHADE_Engine/src/Physics/Collision/SHCollider.cpp @@ -338,7 +338,7 @@ namespace SHADE { case SHCollisionShape::Type::BOX: { - const SHBox* RHS_BOX = dynamic_cast(shape); + const SHBox* RHS_BOX = reinterpret_cast(shape); const SHBoxCreateInfo BOX_CREATE_INFO { @@ -361,7 +361,7 @@ namespace SHADE } case SHCollisionShape::Type::SPHERE: { - const SHSphere* RHS_SPHERE = dynamic_cast(shape); + const SHSphere* RHS_SPHERE = reinterpret_cast(shape); const SHSphereCreateInfo SPHERE_CREATE_INFO { diff --git a/SHADE_Engine/src/Physics/Collision/SHCollisionSpace.cpp b/SHADE_Engine/src/Physics/Collision/SHCollisionSpace.cpp index c643e05e..8be6786c 100644 --- a/SHADE_Engine/src/Physics/Collision/SHCollisionSpace.cpp +++ b/SHADE_Engine/src/Physics/Collision/SHCollisionSpace.cpp @@ -209,12 +209,12 @@ namespace SHADE { case SHCollisionShape::Type::SPHERE: { - baseResult = dynamic_cast(SHAPE)->Raycast(info.ray); + baseResult = reinterpret_cast(SHAPE)->Raycast(info.ray); break; } case SHCollisionShape::Type::BOX: { - baseResult = dynamic_cast(SHAPE)->Raycast(info.ray); + baseResult = reinterpret_cast(SHAPE)->Raycast(info.ray); break; } case SHCollisionShape::Type::CAPSULE: diff --git a/SHADE_Engine/src/Physics/Dynamics/SHContactManager.cpp b/SHADE_Engine/src/Physics/Dynamics/SHContactManager.cpp index caf2a7d6..c9b8dc5f 100644 --- a/SHADE_Engine/src/Physics/Dynamics/SHContactManager.cpp +++ b/SHADE_Engine/src/Physics/Dynamics/SHContactManager.cpp @@ -76,8 +76,6 @@ namespace SHADE continue; const auto* SHAPE_A = manifold.shapeA; - const auto* SHAPE_B = manifold.shapeB; - const SHCollisionUtils::ShapeTransform TF_A = { SHAPE_A->GetWorldCentroid(), SHAPE_A->GetWorldOrientation() }; for (uint32_t i = 0; i < manifold.numContacts; ++i) @@ -138,22 +136,41 @@ namespace SHADE removeInvalidObject(manifolds, eid, shapeIndex); } + void SHContactManager::RemoveExpiredContacts() noexcept + { + // Manifolds + for (auto manifoldsIter = manifolds.begin(); manifoldsIter != manifolds.end();) + { + const auto STATE = manifoldsIter->second.state; + if (STATE == SHCollisionState::INVALID || STATE == SHCollisionState::EXIT) + manifoldsIter = manifolds.erase(manifoldsIter); + else + ++manifoldsIter; + } + + // Triggers + for (auto triggersIter = triggers.begin(); triggersIter != triggers.end();) + { + const auto STATE = triggersIter->second.state; + if (STATE == SHCollisionState::INVALID || STATE == SHCollisionState::EXIT) + triggersIter = triggers.erase(triggersIter); + else + ++triggersIter; + } + } + void SHContactManager::Update() noexcept { - // Clear expired or invalid collisions. If not, test collision. for (auto manifoldPair = manifolds.begin(); manifoldPair != manifolds.end();) { - // Test collision of every manifold. - SHManifold& manifold = manifoldPair->second; + SHManifold& manifold = manifoldPair->second; SHManifold oldManifold = manifold; const bool IS_COLLIDING = SHCollisionDispatcher::Collide(manifold, *manifold.shapeA, *manifold.shapeB); + updateCollisionState(IS_COLLIDING, manifold.state); - auto& collisionState = manifold.state; - updateCollisionState(IS_COLLIDING, collisionState); - - const bool IS_INVALID = collisionState == SHCollisionState::INVALID; - if (IS_INVALID) + // For any false positives + if (manifold.state == SHCollisionState::INVALID) { manifoldPair = manifolds.erase(manifoldPair); continue; @@ -163,19 +180,16 @@ namespace SHADE ++manifoldPair; } - // Clear expired or invalid triggers, If not, test collision. for (auto triggerPair = triggers.begin(); triggerPair != triggers.end();) { // Test collision of every trigger. - Trigger& trigger = triggerPair->second; + Trigger& trigger = triggerPair->second; const bool IS_COLLIDING = SHCollisionDispatcher::Collide(*trigger.A, *trigger.B); + updateCollisionState(IS_COLLIDING, trigger.state); - auto& collisionState = trigger.state; - updateCollisionState(IS_COLLIDING, collisionState); - - const bool IS_INVALID = collisionState == SHCollisionState::INVALID; - if (IS_INVALID) + // For any false positives + if (trigger.state == SHCollisionState::INVALID) triggerPair = triggers.erase(triggerPair); else ++triggerPair; @@ -238,7 +252,11 @@ namespace SHADE { // New states start at invalid. In the first frame of collision, move to enter. // If it already in enter, move to stay - state = state == SHCollisionState::INVALID ? SHCollisionState::ENTER : SHCollisionState::STAY; + if (state == SHCollisionState::ENTER) + state = SHCollisionState::STAY; + + if (state == SHCollisionState::INVALID) + state = SHCollisionState::ENTER; } else { diff --git a/SHADE_Engine/src/Physics/Dynamics/SHContactManager.h b/SHADE_Engine/src/Physics/Dynamics/SHContactManager.h index 81f37146..654e3d98 100644 --- a/SHADE_Engine/src/Physics/Dynamics/SHContactManager.h +++ b/SHADE_Engine/src/Physics/Dynamics/SHContactManager.h @@ -79,6 +79,12 @@ namespace SHADE void RemoveInvalidatedManifold (EntityID eid) noexcept; void RemoveInvalidatedManifold (EntityID eid, uint32_t shapeIndex) noexcept; + /** + * @brief + * Removes any contact manifold or triggers that are in the exit or invalid state. + */ + void RemoveExpiredContacts () noexcept; + /** * @brief * Removes any invalidated contacts and triggers, then performs narrowphase collision diff --git a/SHADE_Engine/src/Physics/Dynamics/SHPhysicsWorld.cpp b/SHADE_Engine/src/Physics/Dynamics/SHPhysicsWorld.cpp index ed00e80e..b4e67688 100644 --- a/SHADE_Engine/src/Physics/Dynamics/SHPhysicsWorld.cpp +++ b/SHADE_Engine/src/Physics/Dynamics/SHPhysicsWorld.cpp @@ -86,13 +86,19 @@ namespace SHADE void SHPhysicsWorld::Step(float dt) { + + /* * Detect Collisions */ + contactManager.RemoveExpiredContacts(); + if (collisionSpace) collisionSpace->DetectCollisions(); + // TODO: Build Islands + /* * Integrate Forces */ @@ -106,7 +112,6 @@ namespace SHADE integrateForces(*rigidBody, dt); } - /* * Resolve Contacts */ diff --git a/SHADE_Engine/src/Physics/Interface/SHColliderComponent.cpp b/SHADE_Engine/src/Physics/Interface/SHColliderComponent.cpp index a36fb730..2924acf8 100644 --- a/SHADE_Engine/src/Physics/Interface/SHColliderComponent.cpp +++ b/SHADE_Engine/src/Physics/Interface/SHColliderComponent.cpp @@ -9,6 +9,7 @@ ****************************************************************************************/ #include +#include // Primary Header #include "SHColliderComponent.h" diff --git a/SHADE_Engine/src/Physics/Interface/SHColliderComponent.h b/SHADE_Engine/src/Physics/Interface/SHColliderComponent.h index 39552949..fb7ae0b0 100644 --- a/SHADE_Engine/src/Physics/Interface/SHColliderComponent.h +++ b/SHADE_Engine/src/Physics/Interface/SHColliderComponent.h @@ -10,6 +10,8 @@ #pragma once +#include + #include // Project Headers @@ -29,6 +31,7 @@ namespace SHADE /* Friends */ /*---------------------------------------------------------------------------------*/ + friend class SHCollisionShape; friend class SHPhysicsSystem; friend struct SHPhysicsObject; diff --git a/SHADE_Engine/src/Physics/Interface/SHRigidBodyComponent.h b/SHADE_Engine/src/Physics/Interface/SHRigidBodyComponent.h index 1173c1d5..cac515b0 100644 --- a/SHADE_Engine/src/Physics/Interface/SHRigidBodyComponent.h +++ b/SHADE_Engine/src/Physics/Interface/SHRigidBodyComponent.h @@ -17,6 +17,15 @@ #include "Math/Vector/SHVec3.h" #include "Physics/Dynamics/SHRigidBody.h" +/*-------------------------------------------------------------------------------------*/ +/* Forward Declarations */ +/*-------------------------------------------------------------------------------------*/ + +namespace reactphysics3d +{ + class RigidBody; +} + namespace SHADE { /*-----------------------------------------------------------------------------------*/ @@ -141,6 +150,22 @@ namespace SHADE void ClearForces () const noexcept; private: + /*---------------------------------------------------------------------------------*/ + /* Type Definitions */ + /*---------------------------------------------------------------------------------*/ + + enum class Flags : uint8_t + { + GRAVITY = 0x1 + , SLEEPING = 0x2 + , LINEAR_X = 0x4 + , LINEAR_Y = 0x8 + , LINEAR_Z = 0x10 + , ANGULAR_X = 0x20 + , ANGULAR_Y = 0x40 + , ANGULAR_Z = 0x80 + }; + /*---------------------------------------------------------------------------------*/ /* Data Members */ /*---------------------------------------------------------------------------------*/ diff --git a/SHADE_Engine/src/Physics/System/Routines/SHPhysicsDebugDrawRoutine.cpp b/SHADE_Engine/src/Physics/System/Routines/SHPhysicsDebugDrawRoutine.cpp index b263df71..fb2750cc 100644 --- a/SHADE_Engine/src/Physics/System/Routines/SHPhysicsDebugDrawRoutine.cpp +++ b/SHADE_Engine/src/Physics/System/Routines/SHPhysicsDebugDrawRoutine.cpp @@ -15,6 +15,7 @@ // Project Headers #include "ECS_Base/Managers/SHSystemManager.h" +#include "Editor/SHEditor.h" #include "Graphics/MiddleEnd/Interface/SHDebugDrawSystem.h" #include "Math/Transform/SHTransformComponent.h" #include "Physics/System/SHPhysicsSystem.h" @@ -36,7 +37,6 @@ namespace SHADE void SHPhysicsDebugDrawSystem::PhysicsDebugDraw::Execute(double) noexcept { -#ifdef SHEDITOR auto* physicsDebugDrawSystem = reinterpret_cast(GetSystem()); if (!physicsDebugDrawSystem->IsDebugDrawActive()) @@ -86,17 +86,22 @@ namespace SHADE } } - if (DRAW_RAYCASTS) - { - const SHColour& RAY_COLOUR = physicsDebugDrawSystem->DEBUG_DRAW_COLOURS[SHUtilities::ConvertEnum(Colours::RAYCAST)]; + #ifdef SHEDITOR + if (DRAW_RAYCASTS) + { + const SHColour& RAY_COLOUR = physicsDebugDrawSystem->DEBUG_DRAW_COLOURS[SHUtilities::ConvertEnum(Colours::RAYCAST)]; - const auto& RAYS = physicsSystem->raycastHits; - for (const auto& hit : RAYS) - debugDrawSystem->DrawLine(hit.start, hit.end, RAY_COLOUR, true); + auto& rays = physicsSystem->raycastHits; + for (const auto& hit : rays) + debugDrawSystem->DrawLine(hit.start, hit.end, RAY_COLOUR, true); - // Clear rays for the physics system - physicsSystem->raycastHits.clear(); - } + // Clear the raycast hit container only in play mode. + // No other raycasts are assumed to be done in pause or stop mode. + const auto EDITOR_STATE = SHSystemManager::GetSystem()->editorState; + if (EDITOR_STATE == SHEditor::State::PLAY) + rays.clear(); + } + #endif if (DRAW_BROADPHASE) { @@ -110,7 +115,6 @@ namespace SHADE debugDrawSystem->DrawWireCube(TRS, AABB_COLOUR); } } -#endif } } // namespace SHADE diff --git a/SHADE_Engine/src/Physics/System/Routines/SHPhysicsPostUpdateRoutine.cpp b/SHADE_Engine/src/Physics/System/Routines/SHPhysicsPostUpdateRoutine.cpp index 47c4ed7b..c884c01a 100644 --- a/SHADE_Engine/src/Physics/System/Routines/SHPhysicsPostUpdateRoutine.cpp +++ b/SHADE_Engine/src/Physics/System/Routines/SHPhysicsPostUpdateRoutine.cpp @@ -35,7 +35,7 @@ namespace SHADE void SHPhysicsSystem::PhysicsPostUpdate::Execute(double) noexcept { - auto* physicsSystem = reinterpret_cast(GetSystem()); + auto* physicsSystem = reinterpret_cast(GetSystem()); auto* scriptingSystem = SHSystemManager::GetSystem(); if (scriptingSystem == nullptr) @@ -93,10 +93,6 @@ namespace SHADE */ } } - - // Collision & Trigger messages - if (scriptingSystem != nullptr) - scriptingSystem->ExecuteCollisionFunctions(); } } // namespace SHADE diff --git a/SHADE_Engine/src/Physics/System/Routines/SHPhysicsUpdateRoutine.cpp b/SHADE_Engine/src/Physics/System/Routines/SHPhysicsUpdateRoutine.cpp index 6ae53b31..7de0a9e6 100644 --- a/SHADE_Engine/src/Physics/System/Routines/SHPhysicsUpdateRoutine.cpp +++ b/SHADE_Engine/src/Physics/System/Routines/SHPhysicsUpdateRoutine.cpp @@ -35,10 +35,10 @@ namespace SHADE { auto* physicsSystem = reinterpret_cast(GetSystem()); - auto* scriptEngine = SHSystemManager::GetSystem(); - if (!scriptEngine) + auto* scriptingSystem = SHSystemManager::GetSystem(); + if (!scriptingSystem) { - SHLOGV_ERROR("Unable to invoke FixedUpdate() on scripts due to missing ScriptEngine!") + SHLOGV_ERROR("Unable to invoke FixedUpdate() on scripts due to missing SHScriptEngine!") } const double FIXED_DT = physicsSystem->fixedDT; @@ -47,12 +47,15 @@ namespace SHADE int count = 0; while (accumulatedTime > FIXED_DT) { - if (scriptEngine) - scriptEngine->ExecuteFixedUpdates(); + if (scriptingSystem) + scriptingSystem->ExecuteFixedUpdates(); if (physicsSystem->physicsWorld) physicsSystem->physicsWorld->Step(static_cast(FIXED_DT)); + if (scriptingSystem != nullptr) + scriptingSystem->ExecuteCollisionFunctions(); + accumulatedTime -= FIXED_DT; ++count; } diff --git a/SHADE_Engine/src/Physics/System/SHPhysicsDebugDrawSystem.h b/SHADE_Engine/src/Physics/System/SHPhysicsDebugDrawSystem.h index 83f96377..211a7829 100644 --- a/SHADE_Engine/src/Physics/System/SHPhysicsDebugDrawSystem.h +++ b/SHADE_Engine/src/Physics/System/SHPhysicsDebugDrawSystem.h @@ -151,4 +151,4 @@ namespace SHADE }; -} // namespace SHADE +} // namespace SHADE \ No newline at end of file diff --git a/SHADE_Engine/src/Physics/System/SHPhysicsSystem.cpp b/SHADE_Engine/src/Physics/System/SHPhysicsSystem.cpp index 4db693a2..508f8807 100644 --- a/SHADE_Engine/src/Physics/System/SHPhysicsSystem.cpp +++ b/SHADE_Engine/src/Physics/System/SHPhysicsSystem.cpp @@ -287,6 +287,11 @@ namespace SHADE collisionSpace->RemoveCollider(PHYSICS_OBJECT.collider); } + #ifdef SHEDITOR + // HACK: Editor stop always goes into scene exit + raycastHits.clear(); + #endif + delete collisionSpace; collisionSpace = nullptr; diff --git a/SHADE_Engine/src/Physics/System/SHPhysicsSystem.h b/SHADE_Engine/src/Physics/System/SHPhysicsSystem.h index 712727ec..b4a6b62e 100644 --- a/SHADE_Engine/src/Physics/System/SHPhysicsSystem.h +++ b/SHADE_Engine/src/Physics/System/SHPhysicsSystem.h @@ -39,8 +39,12 @@ namespace SHADE /*---------------------------------------------------------------------------------*/ friend class SHPhysicsDebugDrawSystem; + friend class SHCollisionListener; + friend class SHRaycaster; public: + + /*---------------------------------------------------------------------------------*/ /* Constructors & Destructor */ /*---------------------------------------------------------------------------------*/ diff --git a/SHADE_Engine/src/Physics/System/SHPhysicsSystemInterface.h b/SHADE_Engine/src/Physics/System/SHPhysicsSystemInterface.h index 8a1f6be8..a9542352 100644 --- a/SHADE_Engine/src/Physics/System/SHPhysicsSystemInterface.h +++ b/SHADE_Engine/src/Physics/System/SHPhysicsSystemInterface.h @@ -17,7 +17,6 @@ of DigiPen Institute of Technology is prohibited. #include "Physics/Collision/SHCollisionSpace.h" #include "Physics/Collision/Contacts/SHCollisionEvents.h" - namespace SHADE { /*-----------------------------------------------------------------------------------*/ @@ -29,7 +28,6 @@ namespace SHADE struct SHPhysicsRaycastResult; struct SHCollisionSpace::RaycastInfo; - /*-----------------------------------------------------------------------------------*/ /* Type Definitions */ /*-----------------------------------------------------------------------------------*/ @@ -39,7 +37,49 @@ namespace SHADE /// class SH_API SHPhysicsSystemInterface final { + public: + + struct RaycastInfo + { + private: + /*-------------------------------------------------------------------------------*/ + /* Friends */ + /*-------------------------------------------------------------------------------*/ + + friend class SHPhysicsSystemInterface; + public: + /*-------------------------------------------------------------------------------*/ + /* Data Members */ + /*-------------------------------------------------------------------------------*/ + + bool continuous = false; + uint16_t layers = static_cast(SHCollisionTag::Layer::ALL); + float distance = std::numeric_limits::infinity(); + SHRay ray; + + /*-------------------------------------------------------------------------------*/ + /* Setter Functions */ + /*-------------------------------------------------------------------------------*/ + + /** + * @brief + * Sets the collider ID for the raycast. Setting this specifies that the ray + * should ignore this collider. + * @param eid + * The entity ID of the collider. + */ + void SetColliderID(EntityID eid) noexcept { colliderEntityID = eid; } + + private: + /*-------------------------------------------------------------------------------*/ + /* Data Members */ + /*-------------------------------------------------------------------------------*/ + + std::optional colliderEntityID; + }; + + /*---------------------------------------------------------------------------------*/ /* Constructor */ /*---------------------------------------------------------------------------------*/ diff --git a/SHADE_Managed/src/Components/Collider.cxx b/SHADE_Managed/src/Components/Collider.cxx index f4b4f09d..b6501951 100644 --- a/SHADE_Managed/src/Components/Collider.cxx +++ b/SHADE_Managed/src/Components/Collider.cxx @@ -4,7 +4,6 @@ \par email: kahwei.tng\@digipen.edu \date Oct 20, 2022 \brief Contains the definition of the functions of the managed Collider class. - Note: This file is written in C++17/CLI. Copyright (C) 2022 DigiPen Institute of Technology. @@ -15,6 +14,9 @@ of DigiPen Institute of Technology is prohibited. #include "SHpch.h" // Primary Header #include "Collider.hxx" + +#include "Physics/Collision/Shapes/SHBox.h" +#include "Physics/Collision/Shapes/SHSphere.h" #include "Utility/Debug.hxx" namespace SHADE @@ -120,7 +122,7 @@ namespace SHADE /* BoxCollider - Constructors */ /*---------------------------------------------------------------------------------*/ BoxCollider::BoxCollider(int arrayIdx, Entity attachedEntity) - : CollisionShape { arrayIndex, attachedEntity } + : CollisionShape { arrayIdx, attachedEntity } {} /*---------------------------------------------------------------------------------*/ @@ -166,11 +168,11 @@ namespace SHADE } float SphereCollider::Radius::get() { - return getNativeCollisionShape().GetWorldRadius(); + return getNativeCollisionShape().GetWorldRadius(); } void SphereCollider::Radius::set(float value) { - getNativeCollisionShape().SetWorldRadius(value); + getNativeCollisionShape().SetWorldRadius(value); } /*---------------------------------------------------------------------------------*/ @@ -307,9 +309,9 @@ namespace SHADE case SHCollisionShape::Type::SPHERE: bound = gcnew SphereCollider(i, Owner.GetEntity()); break; - case SHCollisionShape::Type::CAPSULE: - // TODO - break; + //case SHCollisionShape::Type::CAPSULE: + // // TODO + // break; default: Debug::LogWarning("[Collider] An invalid Collider Type was detected. Skipping."); break; @@ -320,4 +322,4 @@ namespace SHADE subColliderList->Add(bound); } } -} +} \ No newline at end of file diff --git a/SHADE_Managed/src/Components/Collider.h++ b/SHADE_Managed/src/Components/Collider.h++ index c2e732f4..7d9fdca1 100644 --- a/SHADE_Managed/src/Components/Collider.h++ +++ b/SHADE_Managed/src/Components/Collider.h++ @@ -31,7 +31,7 @@ namespace SHADE if (!shape || shape->GetType() == SHCollisionShape::Type::INVALID) throw gcnew System::InvalidOperationException("Attempted to retrieve invalid CollisionShape."); - return dynamic_cast(*shape); + return reinterpret_cast(*shape); } catch (std::invalid_argument&) { diff --git a/SHADE_Managed/src/Components/Collider.hxx b/SHADE_Managed/src/Components/Collider.hxx index 19235571..3c7b060e 100644 --- a/SHADE_Managed/src/Components/Collider.hxx +++ b/SHADE_Managed/src/Components/Collider.hxx @@ -1,7 +1,9 @@ /************************************************************************************//*! \file Collider.hxx \author Tng Kah Wei, kahwei.tng, 390009620 + Diren D Bharwani, diren.dbharwani, 390002520 \par email: kahwei.tng\@digipen.edu + email: diren.dbharwani\@digipen.edu \date Oct 20, 2022 \brief Contains the definition of the managed Collider class with the declaration of functions for working with it.