I've been doing a lot of fiddling with this little FPS in Unity and I got to a point where I needed to figure out how to aim down sight - so again I consulted the implementation of the Unity team in their FPS Microgame (https://learn.unity.com/project/fps-t.... And learnt about creating an entire weapons systems - And whilst I went ahead and implemented the whole thing, that might not be for everyone so I extracted the bit about aiming down sight and I thought I'd share it with you guys.
This video is a bit more high level and explains things at a more conceptual level - I figure if you're searching for how to aim down sight in a Unity FPS game, then you have already gotten relatively far into the process of actually writing the game. So the amount of code shown is minimal, cause really to aim down sight in a Unity game does not require that much code.
The idea is pretty simple, we track the position of the weapon in its default state and in the state where the player would be aiming down sight, and if the player is holding the input for aiming down sight then we lerp to the aiming position, and if the player is not holding the aim button we lerp back to the default position. It's really as simple as that.
Check out my new website: www.tvtig.com
Reach out to me on twitter if you're stuck or need some help with the code: www.twitter.com/tvtig
___________________________________________________
Subscribe: / @tvtig
____________________________________________________