Horje
get 2d rotation from 2 position math Code Example
get 2d rotation from 2 position math
Vector3 dir = new Vector3(position2.x - position1.x, position2.y - position1.y);
float angle = Mathf.Atan2(dir.y, dir.x) * Mathf.Rad2Deg;
Quaternion rotation = Quaternion.Euler( 0f, 0f, angle );




Csharp

Related
discord bot status code c# Code Example discord bot status code c# Code Example
uuid generator asp.net Code Example uuid generator asp.net Code Example
get all devices connected using player input manager unity Code Example get all devices connected using player input manager unity Code Example
c# void Code Example c# void Code Example
download file from url asp net web api c# Code Example download file from url asp net web api c# Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10