嗨，伙计们 Hi guys
与我的频道通话 spoken to my channel
这是我的第一个大型视频 This is my first ever huge video
实际上，嗯，我们在统一制作拇指或视频 Actually uh we're making a thumb or videos in unity
就因为我喜欢它 just because I love it
如果有什么特别的 If there is anything specific
你爱我是为了掩护 you love me to cover
请让我知道你的意见 please let me know the comments
我会帮你查清楚的 and i'll check it out for you
请务必订阅 And please make sure to subscribe
所以在这段视频中 And so in this video
我将介绍如何使用Cindy角色模型和影院机器创建第三人称角色控制器 i'm going to be covering how to create a third person character controller using the cindy character models and cinema machine
所以如果你不熟悉合成资产包 So if you're not familiar with the synthetic asset packs
它们非常适合原型制作 they're pretty great for prototyping
我相信你也可以和他们玩得很尽兴 I'm sure you can actually make full game with them as well
恩 Um
不是的 no
还要别的吗 anything else
他们不是带着动画来的 They don't come with animation
所以你会得到这些美好的爱 so you get these nice love
Polly模型 polly models
最棒的是你可以一次在屏幕上呈现大量的图片 and the great you can render a ton of them on screen at once
它们会批量在一起 They'll batch together
但是没有动画 But there is no animations
所以如果你真的 So if you actually
当用户在游戏中四处走动时 when a user in a game and move around
你得给模型买一些动画 you have to buy some animations to the model
所以这个包特别带有一个男性角色和一个女性角色 And so this pack in particular comes with a male character and female character
因此，只要确保获得政治和启动啄，并让他们安装它 And so just make sure to get the political and start a peck and get their installed it
我们将使用一台电影院机器来拍摄第三人称角色摄像机 And we're going to be using a cinema machine for a third person character camera
而且它还附带了一些 and also it comes with some
一些动画 some animations
他们将给辛迪这个角色牵线搭桥 They will hook up the cindy character
所以是的 So yeah
在我们进入视频之前，只需确保下载多边形初学者包并安装 just make sure before we get into the video to just download the polygon starter pack and install
辛迪失踪 Cindy missing
我恐怕…… i'm afraid
实际上是在这里做的 done it here actually
只需确保你导入了影院机器 and just make sure you import the cinema machine
示例场景 example scenes
因为有一些资产将会使用酷 because that has some of the assets are going to use cool
恩 Um
所以你刚刚停止在这里创造一个新的场景 so you have just stopped created a new scene here
我要做的第一件事，因为我们要制作第三人称角色，就是把它创造成雨 The first thing i'm going to do because we're making a third person character is just creates into rain
游戏对象也是如此 so can do game objects
三天的雨天和凉爽的东西 three day objects to rain and cool
我们得到了这个 We get this
这块漂亮的脸板就是我自己 this nice cheek board myself
这个漂亮的脸颊板需要听，嗯，酷 this nice cheek board takes to hear uh cool
我要向你们展示的第一篇文章来自多边形入门包 So the first essay i'll show you is from the polygon starter pack
多边形启动器首选字符 Polygon starter prefers characters
让我们让它成为最酷的女性 And let's let it is the female one cool
所以是的 So yeah
这是 this is
这真是太棒了 this is great
这个不错 This nice
迟钝的波莉和闪电生活在一起 slow polly and lightning is living with
你改变得太快了 And you are just change that quickly
对此我深表歉意 And sorry about this
嗯 yeah
现在我们可以看到她的脸很酷 now we can she see the face cool
所以是的 So yeah
我们有这个 we have this
我们基本上想要设置动画的这只角色的手 this character hand that we basically want to animate
如果我们快速检查这个角色 If we just inspect the character quickly
我们实际上可以看到，呃，骨架 we can actually see the uh the skeleton
让我们去所有的骨头，一切都为我们整理好了 Let's go all of bones and everything sorted out for us
这真是太棒了 which is great
我们不需要自己坐在地图上 We don't have to sit up that mapping ourselves
恩 Um
不过，是的。 but yeah
没有动画 there's no animations
它有一个动画 It has an animation
附加到其上的IT组件 it component attached to it
但是我们可以看到控制器字段实际上是空白的 But we can see the the controller field is actually blank
所以我会在下一天马上把它修好 so will fix it up in a minute in the next
我说了 I said
我想向你们展示的是电影院综合症 I want to show you is the cinema syndrome
因此，影院机器示例资源附带了一个名为第三人称控制器的角色 So the cinema machine example assets comes with a character called the third person controller
所以如果我们把它拖到我们的 So if we just drag that into our
恩 um
嗯 yeah
我们可以的 we can
我们可以在这里看到这个角色 we can see the character here
嗯，我发现它正好是 And um I found it just the
它会将摄像机对准视图 it was going to align the camera to view
我必须现在玩得很酷，这样我们才能 I had to play now cool so we can
鉴于你有一个角色，我们可以在场景中移动 whereas you have a character that we can move around the scene
这真是太棒了 which is really awesome
所以我们只想从创建个人相机开始 So we just want to create person camera to start with
所以要做到这一点 So to do that
呃 uh
我们可以去辛迪机 we can go cindy machine
免费观看的相机 a free look camera
这就在这里创建了一个新的摄像机 And this creates a new camera here
通过这样做 By doing that
幕后还有一件事是自动发生的，那就是电影院机器 there is another thing that happens automatically behind the scenes were cinema machine
它创造了一个电影院的大脑 which it creates a cinema brain on the
在主摄影机对象上 on the main camera objects
这些摄像机的睡觉称为虚拟摄像机 the rest of these cameras are known as virtual cameras
恩 Um
主摄像机必须有电影院机器的大脑 the main camera has to have the cinema machine brain
否则虚拟摄像机就不能工作了 otherwise the virtual cameras won't work
基本上 Basically
这 this
这个大脑组件管理员喜欢黑色 this brain component managers like black
在虚拟摄像机之间 between the virtual cameras
更新虚拟摄像机之类的东西 updating the virtual cameras or that stuff
所以是的 So yeah
已经出局了 was out
这 this
让我给你看看我没有残疾的东西 Let me show you what I haven't had a disabled
大脑 the brain
基本上 basically
嗯 yeah
不多 not much
但如果我让大脑 But if I enable the brain
噢 oh
所以没什么 so no much
呃 Uh
嗯 yeah
抱歉的 sorry
我走错了一步 I missed a step
这里的这两个字段需要分配给自由外观摄影机 This two field here that need to be assigned to the free look camera
这就是紧随其后，看一看的田野 and that's the follow and look at field
所以让我们先不看第三人称辛迪机器角色 So let's just start without third person cindy machine character
所以如果我把路线签到下面的便条上 So if I sign the route to the follow note
这条遵循的基线是摄像机的平移 this follow baselines is that the translation of the cameras
例如告诉电影院机器 such as telling cinema machine
哪一个 which
在场景中实际跟随哪个游戏对象 which game object to actually follow around the scene
下一个我们想要分配给我们看的 And the next one we want to assign us to look at
对于第三人称摄像机来说，实际查看角色的头部是有意义的，这样在需要胸部的时候就可以在骨骼内部找到它们 It makes sense for a third person camera to actually look at the head of the character so they can be found inside the skeleton once needs the chest
脖子 neck
是的，是的。 And yeah
他很酷 he's cool
所以我们看不到呃也看不到你 So we can not see uh and see you
这个虚拟摄像机现在正看着摄像机，看着我们想要跟踪的对象 This virtual camera is now looking at the camera at the object that we wanna follow
如果我们有游戏 And if we have play
所以我们拥有的酷 so the cool we have
我们有一个相当不错的 we have a pretty good
所以人 So person
恩 Um
所以人 so person
摄像机 camera
不错，出租车现在倒过来了 nice and taxi inverted at the moment
所以我要把它改得更自然一点 So i'm just going to change that to make a bit more natural
所以在轴的控制下 And so under axis control
我们只需将白色通道和一成不变的过剩 we can just invert the white access and unvaried excess
这对于移动鼠标的标准用途控制器来说要熟悉得多 And this is much more familiar with a standard purposing controller from moving a mouse
正确的 right
摄像机 The camera
帕特看起来是对的 pat looks right
左转到左转高管 left goes left executive
那么，嗯，最后一件事是在第三人称控制器上 So um one last thing is on the third person controller
实际上有一个冲刺动画 There is actually a sprint animation
所以冲刺键盘要把这里的键盘绑定改成升降键 so sprint keyboard is going to change the keyboard binding here boy to lift shift
这是大多数游戏的新闻标准 which is press standard for most games
使用Lift Shift键四处冲刺 sprinting around using the lift shift key
呃 Uh
如果其他任何人知道在手动限制评论的过程中疯狂地导航到这一点，就像疯了一样 if anybody else who knows a bit away to navigate this in like insane during a manually limit on the comments
我通常只是反复按l，直到我得到我想要的接球手。 I normally just push l repeatedly until I get the the catcher that I want
哦，太酷了 Oh cool
所以我们应该看到春天的动画 So we should see that spring animation
好的 nice
这样我们就可以散开，绕着摄像机走来走去 so we can spread and walk around a cameras walking
或美好的叙利亚 or good syria
我们现在只想为辛迪这个角色做好所有的准备工作 We just want to make all of the stuff work now for the cindy character
恩 Um
所以如果我们只是通过比较这两个物体来停止 so if we just stopped by comparing the two objects
所以城市一号只有一个动画控制器，没有动画控制器 so the city one is only got an animated no animation controller
分离主义者最小化第三人称控制者在一些动作剧本中得到了刚体资本日历 The separatists minimize third person controllers got a rigid body capital calendar in some movement scripts
所以让我们先把我们的物理学 So let's just start by adding our physics
所以这实际上是我可以让这个角色移动的两种方式 So this is actually two ways I could have made this character move
一个人将在这里的影院机器对象上的测量中放弃模型 One would be resigning the models in the measures on the cinema machine object here
会有更快的 There would be quicker
鸟儿不会教你做这件事所需要的东西 Birds doesn't teach you as much about what is necessary to make this
此角色移动 This character moves
我将通过向该对象添加所需的组件来获得更长的时间 I'm gonna take the longer out by adding the required components to this object
所以如果我们从添加一些物理和大写对撞机开始 So if we start by adding some physics and the capital collider
宣布的外套获得了一些物理知识 coats announced got some physics
我们实际上可以看到首都对撞机的形状 we can actually see the shape of the capital collider
这里比这一个扎实的姐姐复制这里的价值要好得多 Here is much better than this one solid sister copy the values here
因此，我们只需访问咖啡组件即可访问它们 so we can access them by just going coffee component
回到我们的合成特征，而不是粘贴组件和值 going back to our synthetic character than going paste component and values
他们会从这里复制所有的值 And that they will copy all the values from here
所以现在我们有一个相当不错的资本，非常适合角色模型 So now we have like a pretty nice capital that fits pretty nicely around character model
所以这将是一场比赛，并测试这一点 And so this is going to game and test that out
我走进一枚炸弹 And I walk into a bomb
好的 Nice
我可以把它翻过来推来推去 I can tip it over and push it around
我能看些什么呢？ What can I see
在我们上面跑 run on top of us
所以 So
我们把它叫做旅行套餐 and we call it like a trip meal
验尸官算出来了 The coroner worked out it
所以Um 所以um
嗯 yeah
这就是我们为角色欧洲物理所拥有的物理 that's the physics that we have for the character european physical
嗯 嗯
出来也是酷炫 出来也是cool
呃 Uh
先生 sir
嗯 yeah
我们要做的下一件事基本上是让该对象响应键盘鼠标 the next thing we want to do is basically make this objects respond to a keyboard mouse
所以如果我们回到第三个人身上 So if we go back to the third person
影院机器对象角色 the cinema machine object character
我们有这个角色 we have this character
运动笑声 movement laughter
所以我可以直接复制 So I can just copy
复印这个 copy this
然后将其添加到字符中 and then add it to the character
因此，它将组件粘贴为新组件 And so it is go paste component as new
现在我们这座城市发生了一场运动 Now we have the movement on our city
先生 Sir
我玩了一把 I had play
我应该全力以赴 I should be all the move
两个角色同时出现 both characters at the same time
因为他们都有动作 because they both have movement
不会 doesn't
不太管用 doesn't quite work
所以看起来轮换在起作用 So looks like the rotation is working
但是福特的后背坏了 but the ford back doesn't work
恩 Um
嗯 yeah
所以，呃，这实际上是一个警告，我们在这里也可以看到 and so uh this actually a warning here we can see as well
动画师没有播放动画师控制器 Animator is not playing an animator controller
这告诉我们，我们刚刚添加了动作脚本的Now角色中也缺少了一个动画师控制器 so that tells us that we missing an animator controller from the now character that we just added the movement script too
恩 Um
所以是的 so yeah
我们只需双击这项运动 we just double click on this movement
一秒钟的范围 scope for a second
我们可以看到它的基本功能是读取水平和垂直输入创建速度参数 We can see what it does is basically read the horizontal and vertical input creates a speed parameter
然后将其分配给动画控制器 and then assigns that to the animate controller
我去 我去
而且啊是的 而且啊yeah
这基本上就是我们信息的驱动力 and that that is basically what is driving our information
这就是它不起作用的原因，因为动物 which is which is why it is not working because animals are
我们之前发现的是他们的控制器不见了 which we found before is missing their controller
所以我们只需要找到相同的控制器 So we just find the same controller
角色控制器，并将其分配给我们的城市角色 character controller and assign that onto our city character
呃 uh
这个断了很酷 this one 断了cool
现在也是如此，应该是这样，或者说是起作用了。 so are now that should or work
实际上还有一件事需要注意 There's actually one other thing to note
这是电影院里的动画人物是它的最新模型动画物理 Here is the animation on the cinema in character is it's update models animate physics
基本上 Basically
这意味着动画输出AADelta呃正在告诉对象要移动多远 what this means is the animation outputs AAdelta uh is telling the objects how far to move
因此，这是两种方法，您可以将其直接应用于转换本身 So this is two ways you can either apply that doubt it directly to the transform itself
或者你可以告诉物理学将其具体应用，这就是我们想要的 or you can tell physics to apply it specific is what we want
因为我们有一个角色 because we have a character
日历 calendar
资本日历 capital calendar
所以我们只需要在这里更新一下 So we just need to update this here
将情绪从正常更新为动画物理 update the mood from normal to animate physics
恩 um
扣12 扣12
所以说呢，现在我们有了游戏 所以说呢and now we had play
一切都应该很正常 everything should be working
呃 Uh
好吧 okay
所以一部动画 so an animation
这架飞机 the plane
现在除字符外 now except character
看起来很醉 looks pretty drunk
我真的知道这取决于你 I really know what it's up to you
哇哈哈 哇哈哈
好吧 okay
所以看起来物理上有些地方不对劲 so looks like something is wrong in the physics
所以我们只比较右边的 So we just compare the right
我说 I say
因此， so the
我们影院机器角色上的物理得到了XYZ旋转场的定格笑声 the physics on our cinema machine character has got the XYZrotation field frozen laughter
所以我们只需要把他们冷冻在这里 So we just need to freeze them here
我可以告诉你为什么 And I can tell you why
如果我们回到角色运动 if we go back to a character movement
这个动画永久的作用就是，嗯，它只是坐在正在运行的动画上 all this animation permanent does is um it just sits the running animation
实际旋转已在更新目标方向内完成 The actual rotation has done inside update target direction
它有两种模式 There's two modes for it
他的一个相机亲戚 One of his camera relative
另一个人的性格是相对的 the other's character relative
所以是的 So yeah
这基本上就是告诉它直接在移动组中控制变换的旋转 this is basically just telling it controls the rotation of the transform directly inside the movements groups
所以我们不希望物理凌驾于我们的控制之上 So we don't want physics overriding that our controlling it as well
这就是为什么我们 which is why we
我们把这些东西冷冻在这里 we freeze the stuff here
恩 Um
凉爽的 cool
所以现在我玩得很好，立法双打 So now I had play nice and legislative double
嗯 Yeah
双击该控制器 double clicks that controller
所以我们可以看到这首曲子 So we can see this tune
工匠是一个情绪低落的音符 Artier is a low emotion note
它有四个动画 which has got four animations
这其实是一种盲目的这种 This is actually a blindly this
这个看这里的这个小符号，他们看到的意思是一棵空白树 this see this little symbol here that they see means a blank tree
这个在哪里？ Where is this one
只是指一个简单的动画 Just means a simple animation
所以这棵梧桐树 So this plane tree
嗯 yeah
我们可以通过双击 we can inspect by double clicking on
或者，我们也可以双击仅向我们显示盲图的节点 or we can also double click on the node that just shows us the blind graph
如果我们在这里双击这个议案 If we double click on this motion here
我们实际上可以在动画图形中看到 we can actually see inside the animation graph
我们 We
我们玩得很开心 we had play
我们可以控制速度 We can control the speed
过早种植，看看速度参数是如何不能控制旋转的 plant premature and see how the speed parameter is not controlling the rotation
而这是为时过早的方向 And this is the direction premature
从外观上看，它只是控制着向后走 which just controls walking backwards by the looks of it
但是这里没有由动画控制的旋转 but is no rotation being controlled by animation here
那是 That's
这是需要注意的关键问题 that's the key thing to note
嗯，嗯，嗯 um um
这就是我们需要冻结旋转的原因，因为旋转是由他们的脚本直接控制的 which is why we need to freeze the rotation because the rotation is being controlled by their script directly
所以我们还需要做一件事来完全完成这项工作 So there is one more thing that we need to do to fully complete this
摄像机当前正在查看错误的对象 The camera is currently looking at the wrong objects
我们需要看一看这个主题 We need to make a look at the subject
嗯 嗯
所以如果我们回到摄像机前 so if we just go back to our camera
请记住，我们当前只需要针对电影院的那两个字段 remember those two fields we just need to currently is targeting the cinema
影院控制器 cinema controllers
所以我们只需要放弃到Santi Objects的路线和通向呃Santi Object的头部 So we just need to resign the route to santi objects and the head to uh santi object
在脊椎下面可以找到 which can be found under the spine
颈头 neck head
那么哪一个是签约的呢？ So which is a sign up
凉爽的 cool
嗯 yeah
我们可以看出摄像机现在看到的是正确的角色 we can tell the camera is now looking at the right character
嗯 嗯
所以我只是装作很酷 so I just had play cool
也许最后一件事是 Maybe one last thing is
我们只想控制一个角色 we just want to control one character
抱歉的 Sorry
我们只需禁用影院机器上的角色移动脚本 we just disable the character movement scripts on the cinema machine
角色扮演得很酷 Character had play cool
所以现在我们有了完全动画的合成角色 So now we've got fully animated synthetic character
所以这些人物在整个城市都非常相似 So these characters are all very similar across all the city pex
因此，您可以将本教程应用于任何合成包之外的任何角色 So you can apply this tutorial to any character out of any of the synthetic packs
如果你想让它们有动画效果并在游戏中控制它们 If you want to get them animated and control them in game
不过，本教程到此结束。 and yet that is the end of this tutorial
因此，如果您认为本教程太长，我将非常感谢您提供的任何反馈 So I would really appreciate any feedback that you have if you thought this tutorial was too long
太短了 too short
你想要更多细节 You want more details
或者你想让我报道任何其他话题 or you want me to cover any other topic
请在评论中让我知道 Please let me know in the comments
还有哦 And oh
请继续跟进这件事。 follow up with that
尽可能快的。 as soon as I can
我 I
嗯 yeah
非常感谢 thank you very much
祝你今天愉快 Have a good day
所有人都要注意安全 And everybody stay safe
考虑到目前的气候和世界上正在发生的一切 given the current climate and everything going on on the world
谢谢 Thank you
宝贝 baby