public static void TransformFromMatrix(Matrix4x4 matrix, Transform trans)
{
//trans.localRotation = QuaternionFromMatrix(matrix);
trans.rotation = QuaternionFromMatrix(matrix);
Vector3 tmp = matrix.GetColumn(3); // uses implicit conversion from Vector4 to Vector3
// We need to invert the translation on the Y axis
tmp.y = -tmp.y;
//trans.localPosition = tmp;
//tmp.z = 250;
trans.position = tmp;
}