In this tutorial we discuss how to point and shoot a turret towards the direction of your mouse.
SUBSCRIBE: https://bit.ly/2Js78lE
============
SUPPORT: https://www.patreon.com/pressstartclub
In this video, we cover:
+0:50 – Creating a C# Script
+1:40 – Calculating our target position
+2:04 – Crosshairs following mouse movement
+2:40 – Hiding our mouse cursor
+3:15 – Rotating our gun to point towards the mouse
+4:25 – Creating an anchor point for our turret
+5:00 – Firing a projectile on click
+8:40 – Showing off the finished product
IF YOU FOUND ANY VALUE FROM THIS VIDEO CONSIDER JOINING OUR PATREON CLUB:
https://www.patreon.com/pressstartclub
COPY & PASTE CODE FROM THIS TUTORIAL:
https://pressstart.vip/tutorials/2019/04/1/91/unity-point-and-shoot.html
MORE TUTORIALS:
https://pressstart.vip/unity-tutorials
Source