Home Creators Posts Import Register Favorites Logout
haven't archived this post yet. have a subscription? use the importer!

Content


Files

Previews only

Souls-like Part 6 Actions - Unity Tutorial (Advanced)

Want more? https://www.patreon.com/csharpaccent? Get it here https://gumroad.com/l/GFQqV For freelance inquiries unityguru23@gmail.com Other: --------------------------------------------------- My Art tutorials www.sharpstance.com Asset Store Page https://goo.gl/wpHEHO Carnivore Land on Steam http://goo.gl/qlTOuU Social: ------------------------------------------------- Subreddit: http://goo.gl/YSLmVT Twitter: https://twitter.com/AccentTutorials https://twitter.com/NVicBoss Download the animations here https://goo.gl/si5Kqt

Comments

Conner Reid

Is there a reason not to put GetInput() and UpdateStates() on the Update instead of the FixedUpdate? It makes the input much more responsive and makes it so you can very reliably use GetButtonDown for the y_input. I had moved it over there in video 3 or 4, but had to move it back as of this video since DetectAction() happens in states.FixedTick() and it was breaking the new way of handling running. I was wondering if it takes up too much memory or something to put all of the input-related functions on the Update or if future additions to the code would make that non-viable.

csharpaccent

Hey, somehow I missed this :( the reason for not including the GetInput() inside fixed Update is simply because axis used as buttons have a lot of issues with some negating before they could trigger logic, of course that depends on the setup of your scripts. However, i'm not sure about Axis but I'm confident buttons only get updated inside Update() so even keeping them inside FixedUpdate() won't make much of a difference. If you know otherwise then please do tell me :D. As for memory, the fixed Update executed 1-4 times more by default (depending on your settings could be more) based on other factors, so technically it does have an overhead but it should be an insignificantly small one