Advertisement
kadyr

Untitled

Oct 10th, 2021
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. void Update()
  2. {
  3. transform.LookAt(MousePosInWorldSpace());
  4. }
  5. Vector3 MousePosInWorldSpace()
  6. {
  7.  
  8. return Camera.main.ScreenToWorldPoint(Input.mousePosition);
  9.  
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement