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:
parent
1315015b94
commit
bf98e35f63
1 changed files with 3 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue