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

Batched particles: set layer #49

Closed
marwie opened this issue Mar 6, 2023 · 4 comments
Closed

Batched particles: set layer #49

marwie opened this issue Mar 6, 2023 · 4 comments

Comments

@marwie
Copy link
Contributor

marwie commented Mar 6, 2023

Hey,

is it possible to easily update and/or configure the Object3D.layers mask to a batched system? I don't want to exclude particles from being hit when raycasting

Maybe here?

export interface VFXBatchSettings {

@Alchemist0823
Copy link
Owner

Currently, three.quarks doesn't support raycasting yet. We may need to implement raycast method in the batchRenderer to make it work. I briefly checked the layer code in threejs, and it only works on cameras and raycaster. We could will propagate the layer setting from particle system parameter to the batch renderer to support camera flow.

Supporting raycast is a different feature. Ultimately, if we want to support physics. we should probably migrate a significant part of code to WebAssembly or WebGPU.

@marwie
Copy link
Contributor Author

marwie commented Mar 6, 2023

Sorry I wasnt clear maybe:
I want to set the layers on the batched meshes so that the three raycaster ignores them - because currently we get hits for the batched mesh geometry when raycasting the scene

@Alchemist0823
Copy link
Owner

Gotcha. yeah, we will support a layer setting to avoid hits soon. but the results are incorrect without a customized version of raycast on VFXBatch. I don't know if 1e9e40b fix your problem

@marwie
Copy link
Contributor Author

marwie commented Mar 6, 2023

Ah cool - I think it would.

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