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

The collider will not be generated . #24

Open
liuxinjia opened this issue Oct 9, 2019 · 2 comments
Open

The collider will not be generated . #24

liuxinjia opened this issue Oct 9, 2019 · 2 comments

Comments

@liuxinjia
Copy link

When the set the colliderLODIndex in TerrainGenerator to another number instead of 0.
The collider will not be generated.

image

liuxinjia referenced this issue Oct 9, 2019
@liuxinjia
Copy link
Author

liuxinjia commented Oct 9, 2019

The UpdateCollisionMesh function whether can be called is decided by UpdateTerrainChunk function. If the mesh LOD index is different from the collidererLODIndex the mesh still can be generated but mesh collider will not be assigned to. We need to UpdateCollision by ourselves.

@liuxinjia liuxinjia reopened this Oct 9, 2019
@WoodingMP
Copy link

Aware it's been a long time since this was reopened but just had the same issue myself after finishing episode 21, the solution I found was by adding a call to UpdateCollisionMesh() at the bottom of TerrainChunk.OnHeightMapReceived(...)

Sebastian mentioned in the video to add UpdateTerrainChunk() so that your first chunk gets loaded in correctly despite not moving, but he didn't mention about the collision mesh. Hopefully this helps anyone else who comes across the same problem!

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

No branches or pull requests

2 participants