Search Unity

make ground blood rotate to match surface normal (see image)

Discussion in 'General Graphics' started by TKDHayk, Jan 4, 2020.

  1. TKDHayk

    TKDHayk

    Joined:
    Dec 22, 2015
    Posts:
    130
    How do I make my blood puddles rotate to match the normal of the surface they are colliding with?

    The blood puddle is a particle effect produced when another particle hits the ground.

    If I were using game objects instead of particles, I could do something like:

    BloodPuddle.transform.rotation = Quaternion.FromToRotation(transform.up, hit.normal);

    How do I do this for particle effects?

    upload_2020-1-4_18-10-35.png
     
  2. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Unfortunately we don’t have anything built in to support this.

    You would have to do all the maths yourself in script I think, to achieve this (including the collision detection, because even our collision script callback doesn’t support modifying the colliding particles)