#Unity.Mathematics equivalent of Matrix4x4.MultiplyPoint?
1 messages · Page 1 of 1 (latest)
There is no equivalent, but it is easy to make one:
float3 point;
float4 transformedPoint = math.mul(mat, new float4(point, 1));
transformedPoint /= transformedPoint.w;
Actually there is, but it's the exact same code already posted. See TransformHelpers.TransformPoint(float4x4, float3)
...actually, looking more closely, it's not the exact same code; the code in TransformHelpers doesn't include the final divide-by-W. That's not necessary for affine transformations, but should perhaps be included for full generality.
I think this is the difference between MultiplyPoint3x4 and MultiplyPoint