summaryrefslogtreecommitdiff
path: root/Thronefall_1_57/Decompile/NGS.MeshFusionPro/MatrixHelper.cs
blob: feb92b13d75f49a4b840dfabbeeed1d808f6cdb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
using UnityEngine;

namespace NGS.MeshFusionPro;

public static class MatrixHelper
{
	public static Vector3 GetTranslation(this Matrix4x4 matrix)
	{
		return matrix.GetColumn(3);
	}

	public static Matrix4x4 SetTranslation(this Matrix4x4 matrix, Vector3 pos)
	{
		Matrix4x4 result = matrix;
		result.SetColumn(3, new Vector4(pos.x, pos.y, pos.z, 1f));
		return result;
	}
}