Transform.set_direction method

set_direction(self, direction: Vector3, world_up: Vector3) -> Transform:

Rotates this Transform so that

Note: The local Z-axis always attempts to be perpendicular to Y, which may lead to worldUp not always accurately pointed at.

Parameters

  • direction: Vector3

    euler rotation to apply.

  • world_up: Vector3

    upward direction.

Returns