mirror of
https://github.com/Steffo99/mission-failed.git
synced 2024-12-04 22:04:17 +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()
|
void Update()
|
||||||
{
|
{
|
||||||
//Trova la direzione tra il transform e il braccio
|
//Trova la direzione tra il transform e il braccio
|
||||||
Vector2 screenPosition =
|
Vector3 screenPosition =
|
||||||
Camera.main.WorldToScreenPoint(transform.position);
|
Camera.main.WorldToScreenPoint(transform.position);
|
||||||
|
|
||||||
Vector2 direction =
|
Vector3 lookDirection =
|
||||||
(Input.mousePosition - screenPosition) as Vector2;
|
(Vector3)(Input.mousePosition - screenPosition);
|
||||||
|
|
||||||
Vector3 lookDirection =
|
|
||||||
new Vector3(direction.x, direction.y);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* In alternativa provare direttamente con
|
* In alternativa provare direttamente con
|
||||||
|
|
Loading…
Reference in a new issue