I am trying to understand transform.basis in the default script for the CharacterBody3D but I seem to get wrong results for the calculation.
I have a simple 3D scene where I run:
func _ready():
rotation_degrees.y += 45
print(transform.basis)
transform.origin += transform.basis * Vector3(1,0,0)
print(transform.origin)
The value for transform.basis is:
X: (0.707107, 0, -0.707107)
Y: (0, 1, 0)
Z: (0.707107, 0, 0.707107)
and the value of transform.origin at the end is (0.707107, 1.15566, -0.707107)
I don't understand how Godot got to these numbers. When I do the dot product my result is [0.7, 0, 0.7]
I even tried an online calculator and that seems to confirm the result. Also, I have no idea where the y value (1.15566) came from.
Would really appreciate someone helping, I am super lost on this one :/