equivalent of "Make Rot from XZ" of UE?

I want to know how to make an equivalent of the “Make Rot from XZ” function of UE, thank you, guys.

The closest is probably Quaternion.SetLookRotation, which takes the forward and up vectors (probably similar to x-z). That returns a quaternion, not a matrix though. You would then assign the returned quaternion to a transform’s rotation to rotate the transform. If you really want a matrix, then you can use Matrix4x4.Rotate, which takes a quaternion.

1 Like