Week 22:
Creating An Enemy NPC - Part 3:
Continuing from next week, I will now be animating the model of my "Monster" character. In order to do this, I began by creating a folder called “Animation” and then I created a “Animator Controller” that I called “Monster”. In the “Animator” section of the “Monster”, I then added the “Monster-Controller” to it and then went into “Window” > “Animator”. In the “Animator” I clicked on “Parameters” and then I clicked the “+” symbol.
After clicking on the “+” symbol, I then picked “Float” and then I named it “Velocity”. Once I had done this, I need some animations, so I went into the uploaded “Models” folder I took from the Survival Shooter kit, and then went into “Characters”. In the “Import Settings” for the “Zombunny”, I then took their animates and added them to the “Zombear”. This is because “Zombear” does not have any animations but is compatible with “Zombunny”.
In the “clips” section, I then created a new “clip” and I named it “Listen”. I then took a piece from the “Idle” and cut it down from “170” to “230” in the “Start Frame”. I also made sure to click the “Loop Time” option and then I click the “Loop Pose” option. As a result, this now “blends” the two together and allows them to work together a lot more seamlessly. Afterwards, I then clicked “Apply” and allowed this to compile before moving on.
Once I had this this, I then clicked on the “Move” clip and then I dragged the frame until the “Zombunny” was touching the ground. This was at “Frame 11”, I then went to “Events” and created a new “Event” I then called “Footstep”. In it’s “Int”, I simply made it “0” and then went to “Frame 26”, where I then did the same thing and also named it “Footstep” but this I time I made the “Int” into a “1”. I then clicked “Apply” for both of them.
I then dragged “Listen” and “Move” into the “Base Layer” for the “Monster”. I then right-clicked “Listen” and connected it to “Move”. In the “Transitions”, I then unclicked “Has Exit Time” and then clicked on the “+” symbol for the “Conditions” option. I then made the “Velocity” greater than “0.2”. Afterwards, I then right-clicked “Move” and connected it to “Listen”. Here, I then in the “Transitions”, I unclicked “Has Exit Time” and I made the “Velocity” less than “0.2”. So, now, when the “Monster” walks around they should get louder and quieter.




No comments:
Post a Comment