Ok, it's time for my daily question if you're not sick of me yet. :)
I was fooling with my Batman Versus the Martians 2D game last night, and I decided to try out the tutorial for the real time battle system. I set up the AI and got everything working. I especially like that it reports in a window what's happening: Player attack, AI attack whatnot.
So I got all that working. My question though is about animation, and I don't know if this is more of a Unity question or not. In order to use Unity 4.3 2d animations, do I use the mechanim setting in the framework, or do I do something different? I have to admit, I'm not so familiar with the new features of Unity 2D, though I do really like some of the aspects. Frankly, I'm just learning it and don't know how all the parameters work yet. My basic question is, how do I set up a GetInput trigger to activate an animation? Do I need to go into the Unity project settings and controls and set up a Fire1 or something for my attack?
Or would you advise using 2D Toolkit (which I already have) along with Playmaker, which I also have, to run the animations? I'm a little more familiar with those programs than Unity 2D. I know that Kirb is using 2D Toolkit for his game and has it working pretty seamlessly with Ork apparently.
I guess this might be more of a Unity question, but I was wondering if anyone had any thoughts.
Thanks for your time.
Matt
Generally, if you want to perform actions through input, you can do this by using Control Maps. An example can be found in the later game tutorials about real time battles here.
I haven't really tried the new 2D functionality yet myself, but if it's tied into Mecanim (and maybe even the old legacy system), you should have no problem getting the animations to work with ORK Framework.
Regarding Mecanim, it kinda depends on your setup, e.g. you can either play the animations through setting parameters, or use the Play option to directly play them ...
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Once you've set up a custom animation, you should be able to use it just like any other animation in Ork. Whether or not it will actually do what you want it to depends entirely upon how you code it....which is where I'm stuck at now.
edit:
There are a couple ways to call animations directly from a script in Unity. You can also set up a Blend Tree for 2D sprites for walk cycles, and probably a lot more, but that's as far as I've gotten with it.
https://docs.unity3d.com/Documentation/ScriptReference/Animation.Play.html
E.g. the Animation.Play function is what's already used by the legacy animations in ORK Framework.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!