The local up axis (+Y) points as close to the
up vector as possible while staying perpendicular to the local forward axis. The resulting transform is orthogonal, and the scale is preserved. Non-uniform scaling may not work correctly.
The
target position cannot be the same as the node's position, the
up vector cannot be [constant Vector3.ZERO]. Furthermore, the direction from the node's position to the
target position cannot be parallel to the
up vector, to avoid an unintended rotation around the local Z axis.
If
use_model_front is
true, the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the
target position. By default, the -Z axis (camera forward) is treated as forward (implies +X is right).
Note: This method fails if the node is not in the scene tree. If necessary, use
look_at_from_position instead.