1
Fork 0
mirror of https://github.com/Steffo99/mission-failed.git synced 2024-12-04 13:54:19 +00:00

Removed wrong operation and cast

This commit is contained in:
Stefano Calabretti 2018-12-01 19:34:22 +01:00
parent 1315015b94
commit bf98e35f63

View file

@ -19,14 +19,11 @@ public class RotateTowardsMouse : MonoBehaviour
void Update()
{
//Trova la direzione tra il transform e il braccio
Vector2 screenPosition =
Vector3 screenPosition =
Camera.main.WorldToScreenPoint(transform.position);
Vector2 direction =
(Input.mousePosition - screenPosition) as Vector2;
Vector3 lookDirection =
new Vector3(direction.x, direction.y);
Vector3 lookDirection =
(Vector3)(Input.mousePosition - screenPosition);
/*
* In alternativa provare direttamente con