Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Particle positioning on animated object

Discussion in 'General Graphics' started by NeilW, Oct 22, 2015.

  1. NeilW

    NeilW

    Joined:
    May 29, 2014
    Posts:
    40
    Hi,

    We have some particles attached to characters in game, and in a script we modify the bone positions of the character to account for changes in scale. Since we upgraded from 4.6 to 5.2 the particles attached to the character are using the position of the bones before we modify them in LateUpdate.

    I guess the order that things happen has changed between 4.6 and 5.2 but I am not sure how to fix this problem. I tried setting the script execution order of our script to -1000 in case this helped but it doesn't seem to make any difference so I dont know if the particle render positions are being set before LateUpdate?

    Here is the result with no modifying the bones - the particles are positioned correctly:

    upload_2015-10-22_18-0-57.png

    And here is is with the bones modified in late update - notice that the particles are positioned where the bat would be if the bones weren't modified
    upload_2015-10-22_18-0-15.png

    Cheers!
     
  2. NeilW

    NeilW

    Joined:
    May 29, 2014
    Posts:
    40
    So tinkering around trying to get this to work and discovered something weird. If I detatch the particle effect form the skeleton and just set its position to the bone pos in late update. But if I reparent it to the bone (and still set its position each frame) then it doesnt work.

    Very Odd...
     
  3. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,240
    Hey Neil, I believe this is something that I've broken (sorry!)
    However, the good news is that a fix went into our 5.2 patch release yesterday, which I believe will fix your issue. It's due out in 5.2.2p1

    Hope it fixes the issue you are seeing!
    Richard
     
    karl_jones likes this.
  4. NeilW

    NeilW

    Joined:
    May 29, 2014
    Posts:
    40
    Ah great - cheers - definitely had me confused :)