protected virtual void GenerateLayerData() { var layer = Matrix4x4.TRS(transform.position, transform.rotation, Vector3.one); var local = Matrix4x4.Scale(transform.localScale); LayerToWorld.Reset(layer); LocalToLayer.Reset(local); LocalToWorld.Reset(layer, local); }
protected virtual void GenerateLayerData() { var tr = TargetTransform; var localScale = tr.localScale; localScale.z = 1f; var layer = Matrix4x4.TRS(tr.position, tr.rotation, Vector3.one); var local = Matrix4x4.Scale(localScale); LayerToWorld.Reset(layer); LocalToLayer.Reset(local); LocalToWorld.Reset(layer, local); }