LookRotation
Description
LookRotation
is a Function
on Vector3
Returns a rotation that is facing the given forward direction. 'upward' is also needed to determine the direction correctly, but most of the time you can just use Vector3.New(0,1,0), which is up.
Example
local testVariable = Vector3.LookRotation(Vector3.New(1, 1, 1), Vector3.New(1, 1, 1))
Usage
network usage: Any (Client or Server/Host)
returns: Vector3
parameters:
- forward (Vector3)
- upward (Vector3)