Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Transform bug?

Discussion in '5.5 Beta' started by BlankMauser, Sep 17, 2016.

  1. BlankMauser

    BlankMauser

    Joined:
    Dec 10, 2013
    Posts:
    138
    In an animation I'm spawning an effect particle. My game is 2.5D so I apply a mirror script to its transform if the character is facing the other way. This script worked perfect in Unity 5.4 but for some reason does not work in 5.5.

    Here are the results facing left/right:



    On the right is how its supposed to look.

    The code I'm using in the animation event is as follows:


    Code (CSharp):
    1.     public void SpawnFX3Sever(int fxid) {
    2.         GameObject effects = Instantiate (Effects [fxid], FXSpawner3.transform.position, FXSpawner3.transform.rotation) as GameObject;
    3.         if (controller.x_facing == -1) {
    4.             effects.transform.rotation = new Quaternion(effects.transform.rotation.x * -1.0f,
    5.                 effects.transform.rotation.y,
    6.                 effects.transform.rotation.z,
    7.                 effects.transform.rotation.w* -1.0f);
    8.  
    9.             effects.transform.localScale = new Vector3 (-5, 5, 5);
    10.         }
    11.         effects.GetComponent<ParticleGreedSever> ().glowCol = ReferenceColor1;
    12.     }
    I looked through the release notes and upgrade guide and couldn't find a reason why this would be happening. If anyone has any ideas please let me know. Thanks
     
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Hi BlankMauser,
    Thanks for reporting this. Could you please file a bug report with a minimal reproduction case and write the case # in this thread?
     
  3. BlankMauser

    BlankMauser

    Joined:
    Dec 10, 2013
    Posts:
    138
    Thank you for the reply. It took me a while to get to this but here is the case # 837074. I will be updating soon to see if anything is solved.
     
  4. BlankMauser

    BlankMauser

    Joined:
    Dec 10, 2013
    Posts:
    138
    I am bumping this thread because I have received a response. This is apparently due to the different ways 5.3 and 5.4 handle negative scale. However I have still not found a way to solve my issue.



    As seen in the image the rotation is still off even if I let the negative scale go untouched.