Search Unity

Question 2d Lights not Moving Correctly with Parent Transform

Discussion in 'Editor & General Support' started by bioticste, Jan 17, 2022.

  1. bioticste

    bioticste

    Joined:
    Aug 11, 2014
    Posts:
    37
    Child 2d lights are not moving correctly with their parent tranform in Unity 2021.2.8f1. I just updated for 2021.1.11f1 in which the 2d lights were working fine. I have a 2d spot light attached as a child transform to my player at position x0,y0,z0 with a scale of 1,1,1 and a rotation of 0,0,0. The 2D spot and sprite lights in the 2021.2.8f1 version are correct in the editor scene view when not playing. As soon as I click play the 2d lights seem to always be in the correct x position but are placed and move incorrectly on the Y axis this also happens when I build the project.

    It is really strange, I observe the transform positions of the child 2d spot lights and sprite lights and the position, rotations and scales do not change yet the child seems to be in completely different y positions than its parent. Many of my enemies also have 2d lights which now seem to float above and below them. My project is far too big to send in a bug report so I will make a simple project to illustrate the issue and report the bug tomorrow. I'm going back to using 2021.1.11f1 until this is fixed.
     
  2. bioticste

    bioticste

    Joined:
    Aug 11, 2014
    Posts:
    37