Back to Browse

Accurate Aiming Options Discussed & Implemented | Gun Series 7 | Unity Tutorial

18.5K views
Mar 7, 2023
14:44

There are a surprisingly large number of challenges that you run into when trying to get "aiming" right. This week in the Gun Series I'll discuss 3 common implementations for aiming in games, the pros and cons of each one, and we'll even implement them so you can pick which one fits your game the best! 👨‍💻 As always, all code from this video is available on GitHub: https://github.com/llamacademy/scriptable-object-based-guns 🏷️Save 25% on the ultimate C# IDE: JetBrains Rider with code LLAMACADEMY: https://www.jetbrains.com/store/?section=personal&billing=yearly 📚 Resources: ⚫ Visualization of the problem with Raycast from Camera: https://forums.unrealengine.com/t/third-person-shooter-aiming-at-crosshair/129180 🧡 Believe in LlamAcademy's mission and have received value from the videos? Here's how you can show your support: 🌟 Patreon: https://www.patreon.com/llamacademy 🌟 YouTube Member: https://www.youtube.com/channel/UCnWm6pMD38R1E2vCAByGb6w/join or click the Join button on any video 📚 Take my Unity ShaderGraph Course: https://www.gamedev.tv/p/unity-shader-graph?affcode=45216_kuvg0bp7 👕 Get yourself some LlamAcademy merch: https://llamacademy.myspreadshop.com/ 💸 Use my Affiliate Link for Humble Bundles https://humblebundleinc.sjv.io/9g4ak4 💸 Publisher Sale! 50% OFF an entire publisher's Assets! Publisher changes weekly! https://assetstore.unity.com/publisher-sale?aid=1101l9QvC (affiliate) 💸 Save up to 50% on NEW Assets: https://assetstore.unity.com/?new_sale=true&orderBy=1&aid=1101l9QvC (affiliate) Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase. Chapters: 00:00 Summary of Solutions 01:00 Option 1 Pros and Cons 02:43 Option 2 Pros and Cons 03:46 Option 3 Pros and Cons 05:27 Define ShootType.cs 05:38 Support ShootType on ShootConfigScriptableObject.cs 05:46 Shoot from Camera in GunScriptableObject.cs 09:14 Give Camera to GunSO in PlayerGunSelector.cs 09:22 Hook up References & Demo 10:30 Show Accurate Crosshair in PlayerAction.cs for FromGun ShootType 12:55 Demo 2 with Accurate Crosshair with ShootType.FromGun 13:48 Closing & Support LlamAcademy

Download

0 formats

No download links available.

Accurate Aiming Options Discussed & Implemented | Gun Series 7 | Unity Tutorial | NatokHD