Hi there
What would be the proper way to “apply” Matrix4x4 to a transform ?
Basically extract position and rotation out of it ?
Thanks!
You can get the matrix from a transform using the worldToLocalMatrix and localToWorldMatrix properties. However, these are read only, so there isn’t any way to set their values. Also, the Matrix4x4 has methods to contruct a translate/rotate/scale matrix, but not to retrieve these values from an existing matrix.
The only option for setting the values would seem to be to find the separate translate/rotate/scale values yourself and then set the appropriate values in the transform.
Yep, this is exactly my problem. In docs there is only 1 exaple in all of Matrix4x4 class!! It shows how to construct matrix from transform values ( axises and position) so I assume you can extract the values in the same manner, but it’s not acting exactly the way it should, so I wandering if the is a better, proper way of doing it… Any info would be apriciated!
Thansk!