Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/collider and layer cleanup #341

Merged
merged 4 commits into from
Jun 10, 2021

Conversation

fernando-cortez
Copy link
Collaborator

Jira task here.

Changes:

  • Colliders on floor dungeon pieces are enabled on the prefab, but now get disabled on Awake(). This is the best tradeoff I found for reducing total colliders inside of BossRoom scene, but still allowing re-baking of the NavMesh. This also provides the most accurate NavMesh if it uses the actual floor tile colliders.
  • To provide a surface to enable player navigation, a plane with MeshCollider now covers all of Dungeon and is on "Ground" layer. This plane is disabled by default inside of Dungeon prefab but is enabled on Awake().
  • AoE action has been slightly modified to check against a NavMesh surface instead of a ground collider, since now there is a plane that covers all of the level. This means that you can still only use AoE actions inside of the walkable level area. Will be a net benefit since we remove raycast calls from an Update() method.
  • Removed colliders on "top" wall prefabs as they did not contribute to gameplay or navigation.
  • Removed NavMeshObstacle components from prefabs as these prefabs only needed to be added to "Ground" layer to affect the generated NavMesh.
  • Removed references to unused "HeavyObject" layer inside of ServerFloorSwitch, and subsequently removed from layers altogether.
  • Removed old generated NavMeshes and renamed the newest one.
  • Physics layer matrix cleaned up with now less possible layer interactions.
  • Made a fix to my previous PR's scrolling UVs modification. This can be simply be done inside one single behaviour with a reference to the material. ScrollingUVs component is removed from lava prefabs. The laval material will also not get marked up by git as modified.

Some before and after screenshots of Physics profiler section:

pre-physics-cleanup

post-physics-cleanup

…ers now disabled in-game), layer/physics matrix cleanup, all navmeshobstacles removed, AOE searches for valid point on navmesh
…crolling with one scrolling script (vs per lava gameobject)
@fernando-cortez fernando-cortez added the 1-Needs Review PR needs attention from the assignee and reviewers label May 26, 2021
@SamuelBellomo SamuelBellomo merged commit a9cea09 into develop Jun 10, 2021
@SamuelBellomo SamuelBellomo deleted the feature/collider-and-layer-cleanup branch June 10, 2021 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-Needs Review PR needs attention from the assignee and reviewers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants