This seems impossible in companion component situation without particle collision module compatible with ecs physics. yes i know https://github.com/Unity-Technologies/CharacterControllerSamples/tree/master/OnlineFPS uses a simple custom particle system, but i think it only can be prototype purpose, this make me think ecs may not appropriate to consider 1.0 or production ready. how do you think of this?
#How do you implement Bullet/Lazerbeam effects in dots?
1 messages · Page 1 of 1 (latest)
why not just make physics raycast and render beam using it's result?
because vfx artist tends to make vfx with particle system, let's say a beam particle use a Sub Emitter module to emit fire particle when collide with physics object, this is easy with existing physics feature of particle system. but with companion component, i don't think authoring particle like this is a viable thing.
a common pattern like this
OnlineFPS uses a simple custom particle system, but i think it only can be prototype purpose
That's correct. The particle system here is just made for the sake of keeping the project as simple as possible, but it's very far from efficient since it's one-meshrenderer-entity-per-particle
While I havent tried this in practice, I think the solution here would be to do all the collision detection in ECS land, and send info about the collision to the VFXGraph. We wouldn't be using the collision features of VFXGraph so the setup would have to change
This would work in the case of a laser beam, but I'm sure there are other cases where it wouldn't work (if there are multiple VFXGraph particles that need to spawn things on collide)
In that case I think there might just not be a viable solution yet, other than duplicating the colliders in GO land, which most would say isn't a "viable solution"
yeah, particle system cannot interact with ECS physics. So that's a no go
i do notice vfx roadmap said will consider dots runtime integration about 3 yrs ago, but i think in the foreseeable future, it won't be on dots roadmap right?
i do find a possible way to solve this (not tried yet):
- bake ParticleSystem subEmitters & collisionmodule to ECS data.
- read ParticleSystem every particle then manually call child ParticleSystem.emit() / ParticleSystem.TriggerSubEmitter()
IJobParticleSystemParallelFor could be a help when dealling with perf.
for vfx graph, i'm not familiar with so can't say anything.
huh, didn't know PS jobs exist
that's a really cool stuff
generally for hybrid stuff you want to implement pooling because simply baking ParticleSystem will result in it's cloning
and when you have a bunch of stuff flying around that's... yeah
hold on,
Does VFXGraph collisions actually use Physics colliders, or is it screen-space collisions based on renderers?
VFX is using depth buffer afaik
just realized we were talking about regular particle system and not VFX graph. I suppose the regular particle system does know how to collide with actual physics