How to change local facing direction (-z) to a specific direction(or angle) on global space

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By siamak-s
:bust_in_silhouette: Reply From: BraindeadBZH

to_global() ?

That’s about a point! Converting a local point to global position.
I want to change facing direction(-z) to direction of a vector on global space (ex Vector3(-1, 0, 0))
I know assigning global_transform.basis.z = -Vector3(-1, 0, 0) could be helpful, but what about other basis axis (x and y)? If I change the z axis basis manually and without rotation function, other axis does not change and some type of deformation on object occured.

siamak-s | 2019-08-29 12:50