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.

Possible Bug with ECS transforms system with preview 11

Discussion in 'Entity Component System' started by yc960, Aug 24, 2018.

  1. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    228
    While pouring through transform system code, I noticed something likely a bug when a child have only scale component. Following is transform system preview 11 line 507 to 518
    Code (CSharp):
    1.                 if ((!chunkPositionsExist) && (!chunkRotationsExist) && (chunkScalesExist))
    2.                 {
    3.                     for (int i = 0; i < parentCount; i++)
    4.                     {
    5.                         chunkLocalToWorlds[i] = new LocalToWorld
    6.                         {
    7.                             Value = math.mul(float4x4.translate(chunkPositions[i].Value),
    8.                                 float4x4.scale(chunkScales[i].Value))
    9.                         };
    10.                     }
    11.                 }
    notice that it reads from "chunkPositions" when "chunkPositions" does not exist.
     
  2. mike_acton

    mike_acton

    Unity Technologies

    Joined:
    Nov 21, 2017
    Posts:
    110
    Yes. Will be fixed in newer versions.