Importing animations and creating the Monster
For the sprout animation, I had some trouble getting it to work within unity. Unlike the chest animation, I couldn’t really add bones to the model to make it work because the bones would mess up the curve modifier animation but the curve animation would not import into unity.
Therefore I found a video showing how to export any animation? From Blender into unity and they shared how the mmd format can be used to turn a curve modifier animation into shape keys, it also showed how to make the shape key animations work in Unity with a script but I had not tried this yet. I first wanted to test if the import into Unity would carry across the animation at all, so I followed the steps of the tutorial and exported as mmd duplicated the model in blender and removed the modifiers from the duplication. I then imported the mmd file while the duplication was selected and the problem I had with this was that unlike the model in the video, my model had multiple parts (leaves) parented to a main part and only the main part (which had the curve modifier animation) had the correct animation, the leaves (which became smaller in the original animation due to the scaling of the parent object being animated) were no longer animated because I think only the main animation was transferred and since the animation uses shape keys animation passed from the parent object to the leaves no longer worked.
In some way, this is good because it would be somewhat annoying to have lots of shapekeys for each individual leaf. I ended up transferring the model to a separate blender file and I added animations to the leaves and I tried exporting the model as ABC (for attaching the animations I believe) then to mmd to fbx I believe this animation worked in blender but I still need to figure out how to make it work in unity and I might have problems with the keyframes so I may have to create my own keyframes for the animation (which I was trying to avoid doing because I tried to do this before and I think this model would be much harder to animate using shape keys in comparison to the flower from my independent project because the leaves would also need to be animated with shape keys and this would not be as easy as copy and pasting)
I also started working on the monster character. I had originally wanted this monster to be dragon-like however I didn’t think this would work well with the small size of the tiles (because the tiles are just slightly bigger than the character) and the tile-by-tile movement ( which still needs fixing) therefore I was thinking of other ideas of a character that looks a bit scary but still a bit funny and cute to fit the vibe I want for the game.
Since the colour I had in mind for this character was purple I thought of other fruits and vegetables that were purple (to go with the concept of the character being a potato) I thought of beetroot (and dragonfruit but I couldn’t remember the name when I was thinking for some reason) I then thought that the character could be hedgehog-like with spikey leaves maybe. I tried adding individual shapes but unlike the character, I would need lots of additional shapes so I decided to make the spikes part of the model by moving alternating vertices. I liked this effect but I still need to work on the face since I did not do too much for it.
![]() |
(This image is improved version of the monster model, I added eyebrows to make it seem angry) |
However, this model was good enough to start scripting the monster. I duplicated the character tile movement script and removed the unnecessary parts. I then had to edit the script so that the monster would move towards the character. I did this by comparing the positions of the monster to the character and running a function depending on the positions as well as the input from the player for the character to move ( so that the monster moves after the character)
I also had to fix some issues with the code because it was moving the wrong way at times and I also accidentally made an infinite loop in the code which was not good. The other problem was that it was hard for the monster to catch the character (which I had expected) so I added to the script so that the monster would randomly be able to move an extra time. I was happy with this because it made it possible for the monster to catch up while still making it possible for the character to escape with some smart movements.
I could also add a time limit to make it more challenging, perhaps for a logical sense rocks could block the exit if the character could not leave in time. The other thing I did was add cutscenes to indicate the ends of the level. This included the monster taking a bite of the potato.
Comments
Post a Comment