Skip to content

NavMeshSurface - support for tree colliders #101

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

OndrejPetrzilka
Copy link

@OndrejPetrzilka OndrejPetrzilka commented Oct 31, 2018

After sources are collected by calling NavMeshBuilder.CollectSources, go through and add tree colliders for each TerrainCollider encountered.

Supported tree colliders are: Sphere, Capsule, Box, Mesh.

Tree colliders are added with hard-coded area Non-walkable.
NavMeshModifier on trees is not supported (yet).
NavMeshModifierVolume should work as usual, even on trees.

In future I'd like to support NavMeshModifier and use default area instead of hard-coded Non-walkable

Resolves #30

@OndrejPetrzilka OndrejPetrzilka changed the title Add tree colliders for each processed TerrainCollider NavMeshSurface - support for tree colliders Oct 31, 2018
@OndrejPetrzilka
Copy link
Author

There was missing TryCast extension method, fixed

@hendriku
Copy link

@turadr Could we please have a review on this? Would be so awesome to have this available in the NavMeshComponents. Thank you! :))

@turadr
Copy link
Collaborator

turadr commented Jan 11, 2021

@hendriku We appreciate the work put into this PR but unfortunately we cannot take contributions to this repository right now. If that will become possible in the future we will then address this PR.

@kkolyan
Copy link

kkolyan commented Dec 3, 2022

thanks, that's useful!

SphereCollider sphere;
CapsuleCollider capsule;
MeshCollider mesh;
if (collider.TryCast(out sphere))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (collider is SphereCollider sphere), etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants