video thumbnail 22:12
Unity Create a Game Series (E20. recoil and reloading)

2015-11-07

[public] 26.6K views, 442 likes, dislikes audio only

In episode 20 we make the aiming more precise and code some simple recoil and reload animations.

Source code:

https://github.com/SebLague/Create-a-Game-Source

Unity project:

https://github.com/SebLague/Create-a-Game-Project

Follow me on twitter @SebastianLague

Support my videos on Patreon: http://bit.ly/sebPatreon


Game development tutorials. Support my videos on Patreon
https://www.patreon.com/SebastianLague
get some simple recoil and reload animations going for the gun
/youtube/video/r8JTwe6dewU?t=12.4
take a new vector3 for the aim point
/youtube/video/r8JTwe6dewU?t=53.5
move the gun back a little bit
/youtube/video/r8JTwe6dewU?t=277.76001
create a float over here for the recoil angle
/youtube/video/r8JTwe6dewU?t=396.10999
head on over to our gun prefab
/youtube/video/r8JTwe6dewU?t=766.14001
shoot all of the projectiles
/youtube/video/r8JTwe6dewU?t=864.06
start the reload animation
/youtube/video/r8JTwe6dewU?t=973.39001
animate the gun simply rotating up and then rotating
/youtube/video/r8JTwe6dewU?t=1034.29
set our current reload angle
/youtube/video/r8JTwe6dewU?t=1092.59
create a public void reload method
/youtube/video/r8JTwe6dewU?t=1213.429