Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | DaddyMonster |
I’m looking for a method similar to look_at
but instead of taking the target position it rotates to face a normalized vector3.
For example:
obj_1.transform.basis.x = Vector3(1, 0, 0)
obj_1.transform.basis.y = Vector3(0, 1, 0)
obj_1.transform.basis.z = Vector3(0, 0, 1)
Say I wanted to change the Y vector from (0, 1, 0)
to: (0, 0, 1)
tilting it forward. This would give:
obj_1.transform.basis.x = Vector3(1, 0, 0)
obj_1.transform.basis.y = Vector3(0, 0, 1)
obj_1.transform.basis.z = Vector3(0, -1, 0)
What’s the transform here so I can know the X and Z values without sheering or scaling?
My head is swimming from Khan Academy and 3 Blue, 1 Brown and I can’t find how to do this simple transform. A helping hand would be thoroughly appreciated.