Attention |
Topic was automatically imported from the old Question2Answer platform. | |

Asked By |
KnightNine |

just realized that I can’t get **Transform().rotated()** to return anything besides an empty Transform matrix. Is this function broken? Also what is “Phi” and why does this function need it?

This is killing me to have been on this issue for so long, please help.

**edit:**

Someone in the Godot discord suggested using `Transform(Basis(Vec3_radian_angle_here))`

which was more for what I needed since I was storing it as “euler angles” which is what the non-matrix rotation values in the editor are in.

Hope this helps someone else if they stumble upon the same confusion.

If it helps, “phi” is just another word for “theta”. In other words, you supply an angle (that uses radians, not degrees) to rotate whatever node is utilizing `Transform`

.

Ertain | 2020-02-11 00:35

Transform() does not seem to construct a Transform, you need an argument: Transform — Godot Engine (3.2) documentation in English

Transform.IDENTITY gives you an identify transform to work with.

“phi” is the rotation angle in radians around the axis defined by the Vector3. The x axis would (1, 0, 0) but it can be any orientation.

Andreas Plesch | 2020-02-11 05:17