I’m using the particle system to instantiate and fire projectiles from a gun. The projectiles collide with the environment as well as other characters in the scene. Unfortunately the projectiles also collide with the character that is shooting them and I can’t find an obvious solution to this issue. I cant change the collision layers because enemies need to be able to hit the player as well as each other.
Anyone know of a solution or workaround? I have already created a projectile system using colliders and rigidbodies for acceleration that works fine but I want to take advantage of the particle system’s motion and sub-emitter features.
I found a quick and easy workaround if anyone else runs into this issue:
A combination of particle offset from the launchpoint and adjusting the size of the particle from 0-1 briefly as it launches works OK to prevent the issue. Since the size of the particle affects the size of the collider you can set the size to start at zero and ramp it up to 1 right as the projectile launches you give the projectile a chance to clear the characters collider at launch.
I also added a slight forward offset on the projectile transform.position += transform.forward * offset;
Both of these settings must be tweaked based on particle size and character movement speed
1 Like