- Unity Artificial Intelligence Programming
- Dr. Davide Aversa Aung Sithu Kyaw Clifford Peters
- 404字
- 2021-06-10 18:57:47
Locomotion
Animals (including humans) have a very complex musculoskeletal system (the locomotor system) that gives them the ability to move around the body using the muscular and skeletal systems. We know where to put our steps when climbing a ladder, stairs, or on uneven terrain, and we know how to balance our body to stabilize all the fancy poses we want to make. We can do all this using our bones, muscles, joints, and other tissues, collectively described as our locomotor system.
Now, put that into our game development perspective. Let's say we have a human character who needs to walk on both even and uneven surfaces, or on small slopes, and we have only one animation for a walk cycle. With the lack of a locomotor system in our virtual character, this is how it would look:
First, we play the walk animation and advance the player forward. Now the character knows it's penetrating the surface. So, the collision detection system pulls the character up above the surface to prevent this penetration. This is how we usually set up the movement on an uneven surface. Even though it doesn't give a realistic look and feel, it does the job and is cheap to implement.
Let's take a look at how we walk upstairs in reality. We put our step firmly on the staircase and using this force, we pull up the rest of our body for the next step. This is how we do it in real life with our advanced locomotor system. However, it's not so simple to implement this level of realism inside games. We'll need a lot of animations for different scenarios, which include climbing ladders, walking/running upstairs, and so on. So, only the large studios with a lot of animators could pull this off in the past, until we came up with an automated system:
Fortunately, Unity 3D has an extension that can do just that:
This system can automatically blend our animated walk/run cycles, and adjust the movements of the bones in the legs to ensure that the feet step correctly on the ground. It can also adjust the original animations made for a specific speed and direction on any surface, arbitrary steps, and slopes. We'll see how to use this locomotion system to apply realistic movement to our AI characters in a later chapter.
- 網(wǎng)絡(luò)云百問百答
- 物聯(lián)網(wǎng)(IoT)基礎(chǔ):網(wǎng)絡(luò)技術(shù)+協(xié)議+用例
- EDA技術(shù)與VHDL編程
- 電子政務(wù)效益的經(jīng)濟分析與評價
- 物聯(lián)網(wǎng)之魂:物聯(lián)網(wǎng)協(xié)議與物聯(lián)網(wǎng)操作系統(tǒng)
- Mastering JavaFX 10
- Mastering TypeScript 3
- React Cookbook
- 從實踐中學(xué)習(xí)手機抓包與數(shù)據(jù)分析
- INSTANT LinkedIn Customization How-to
- 園區(qū)網(wǎng)絡(luò)架構(gòu)與技術(shù)
- 現(xiàn)代通信系統(tǒng)(第5版)
- 云計算技術(shù)與標準化
- 走近奇妙的物聯(lián)網(wǎng)
- 趣話通信:6G的前世、今生和未來