Skip to content

Commit

Permalink
fix player collision, still hacky but less hacky
Browse files Browse the repository at this point in the history
  • Loading branch information
o7Moon committed Nov 5, 2023
1 parent 5e86a6a commit 051a04a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,8 @@ public static void onPlayerAwake(PlayerManager __instance){
if (!isPractice()) return;

foreach (Collider c in __instance.gameObject.GetComponentsInChildren<Collider>()){
c.enabled = false;
c.isTrigger = true;// hacky solution to the game reenabling certain coliders every frame
c.gameObject.layer = 4; // even hackier solution (set collision layer to water)
if (c.gameObject.layer == 6)// if this collider is ground layer
c.gameObject.layer = 4; // HACK (set collision layer to water)
}
}

Expand Down

0 comments on commit 051a04a

Please sign in to comment.