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

Swarms become invisible #2

Closed
corbinyo opened this issue Dec 29, 2017 · 3 comments
Closed

Swarms become invisible #2

corbinyo opened this issue Dec 29, 2017 · 3 comments
Assignees
Labels

Comments

@corbinyo
Copy link

Hi there,

I am encountering issues with the swarms becoming invisible to my camera at certain points when my scene is running. I am animating the swarms and moving them around. Have you dealt with this issue before?

@keijiro keijiro self-assigned this Dec 31, 2017
@keijiro
Copy link
Owner

keijiro commented Dec 31, 2017

I guess that it disappears because of inaccurate frustum culling. I wonder if it could be resolved by expanding the bounding box.

https://github.com/keijiro/Swarm/blob/master/Assets/Swarm/CrawlingSwarm.cs#L271

@corbinyo
Copy link
Author

Thank you, I will try this. The Swarm I am using is the Floating Swarm. I will report back how this goes.

@corbinyo
Copy link
Author

corbinyo commented Jan 3, 2018

This works, no issues with disappearing anymore - thank you.

Setting are as follows in the "FloatingSwarm.cs" script.:

Graphics.DrawMeshInstancedIndirect( _template.mesh, 0, _material, new Bounds(Vector3.zero, Vector3.one * 10000), _drawArgsBuffer, 0, _props );

@keijiro keijiro closed this as completed Jan 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants