Creating the village
When working on the village terrain I realised that I could not make the terrain as steep as I had drawn it in my storyboard, because the characters might have trouble navigating it. I also wanted to look for how to allow the character to move along the terrain and found this video explaining the character controller, which I have not made use of before. How to Move Characters in Unity 3D: Built-In Character Controller Explained [#1] (youtube.com)
I then looked at the documentation Unity - Scripting API: CharacterController (unity3d.com)
Add 90 Degrees to Transform.Rotation - Questions & Answers - Unity Discussions
After figuring out the characters movement I then tried to make a movement script for the NPC I first tried moving the NPC in a random direction but this did not work (The character just played the rolling animation but did not move or moved very slightly) I then tried to use Transform.MoveTowards with waypoints but this did not work either. It only worked if I set the speed to 100 and then the character would teleport between locations for a minute and then get stuck.
So I created an empty parent of the character and created an animation for it. I then searched for how to pause the animation so I could pause it while the Player talks to the NPC and then resume the animation once they are done. To do this I defined the NPC's parent Animator and in the script I set .speed to true or false.
unity - How to play and pause animation - Game Development Stack Exchange |
Please help me with script making UI canvas look towards camera. - Unity Forum
Comments
Post a Comment