What is the difference between matrix and transform?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By bgegg

If i want to move, rotate, and scale separately, it is better transform.
Is it better to use a matrix if i want to do both at the same time?
I do n’t know if I ’m correct

:bust_in_silhouette: Reply From: DamonR

A matrix is a way of holding data ( Matrix (mathematics) - Wikipedia ).
Transforms in godot are matrices, so by using transforms, you are using matrices.
When you translate, rotate, or scale an object, it updates that object’s transform matrix.
When you say you want to do both at the same time, do you mean as part of an animation/action? Or while in the editor?
Hope this helps.

Thank you.
If one is used, the other is used.
Certainly the two seem to be linked.

Understand that the conversion method is different.

I’m trying to do all of scale, movement, rotation with transformation or matrix, not animation

bgegg | 2019-09-06 09:48

By using transforms, you are using matrices, it’s just how Godot handles its transforms as far as I understand.
What are you trying to achieve by using transforms? Are you just moving and resizing assets while in the editor, or are you trying to move/resize assets during runtime?
Hope this helps.

DamonR | 2019-09-06 10:10

Thank you.
There is no clear purpose.
However, both can be rotated and scaled.
From the matrix, we use the basis to get the direction, which is the difference I understand.

bgegg | 2019-09-07 01:23