Vector3.LookRotation||doc136380

September 20, 2022

Format

Vector3.LookRotation(fromPos, facePos)

Describe

Calculates the rotation vector from one point to another. It can be used to make one object face another, for example, a nearby NPC always faces the player character.

parameter

Variable name Type Describe
fromPos Vector3 current location
facePos Vector3 Target point

Return value

Type Describe
Vector3 3D vector type data