Search Unity

Particle Effect Collision Problem

Discussion in 'Physics' started by Lotusss12, Aug 20, 2021.

  1. Lotusss12

    Lotusss12

    Joined:
    Apr 13, 2021
    Posts:
    2
    Hi everyone, I'm new in Unity. I have a particle effect, since I don't want it to collide with some objects, I turn off the collision with the target object by using the IgnoreCollision method in the start function. I'm checking the collision with the Debug log and IgnoreCollision is working and not getting into OnCollisionEnter in any way. However, even though they don't collide, the effect throws itself a little further when it hits my target object. Normally the effect goes towards the mouse's position, but when it touches that target it goes further as if it's taking a force from there. What could be the reason for this?
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,500
    Note that particles are not controlled by the Physics API. The particle system is just using physics like any user would. Anything to do with particles is controlled entirely by the particle API and options.

    IgnoreCollision, as the docs state, are for Colliders. As I said though, nothing you find in the physics API will control particles.

    I'll add a "particles" tag to your post so hopefully a particle dev will see it.
     
    Lotusss12 and richardkettlewell like this.
  3. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    In the collision module for the particle system, you can set the collides with layers to include/exclude stuff. I think that’s the only way I know to filter this.
     
    Lotusss12 and MelvMay like this.
  4. Lotusss12

    Lotusss12

    Joined:
    Apr 13, 2021
    Posts:
    2
    I tried the collision module in the particle system but result is the same whether I do it with particle system or rigidbody. No collision any way but takes force and changes position.
     
  5. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,500
    Your descriptions so far are confusing and a little vague TBH. So to be clear, NOTHING you change in the physics system affects particle system collisions, it's all controlled via the collision module. The only thing relevant are having colliders on the layers you select for them to hit.

    If you have a problem, us knowing you've guessed at a bunch of things won't help clarify or solve anything. You should clearly state what you've done (not in a vague way) and what you are expecting to happen (in explicit terms). Saying that you've configured a Rigidbody and made physic API changes are irrelevant to the particle system which only cares about Layers so discuss the particle system things you've configured.
     
  6. muzammilshahiddevhouse

    muzammilshahiddevhouse

    Joined:
    Mar 13, 2021
    Posts:
    10
    @Lotusss12 Please check this image. I fixed my issue by tweaking the layers in particle system collision module.
     

    Attached Files: