Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Part of crafting a game and really promoting that immersion in the game environment is thinking about how that player moves around and how they react and interact with their world. We know we're going to do things like triggers that open doors for example and move walls around. But we also need to think about the player controller, itself. How big is it, what are the movement options available, and how does it move around? Is it fast, is it slow? Is it a creep? What are we really after, here. I'll select the first person controller in the hierarchy and look at its properties in the inspector.
Remember, this first person controller is instance from the assets, so changes made here will reflect back on the original. And I can tell it's an instance because that text is in blue in the hierarchy. In the inspector then, that first person controller comes with controls for looking around and moving and. So forth, and jumping and sliding, and we can change these as we need. The first thing I'll look at is the height. This height of two is two meters. And, that's six foot, seven, which is Darth Vader tall. It's a very, very tall person.
So tall, that This person or this controller will brush the tops of doorways in a lot of standard doors. If we're dealing in an eight foot door it looks okay but this really tall person will look odd next to a three foot railing which the railings in this gallery are. So we want to change the height of our player controller. I'll put this height at, well let's try 1.6 meters. And this will reduce that size a bit. I will click on the scene and press F to focus in and there is that player controller, as soon as I zoom through the wall and that height of 1.6 will react a lot better.
Now, there is a couple of parts to the first person controller here what I'm actually changing by playing with this height Is that collider, that capsule shown in green around it. So putting in a height of 1.6 affects the size of that capsule collider, not the mesh itself drawn in gray. To affect that mesh, we'll open up the first person controller, and there's graphics. And there's the actual capsule. If we'd like to play with the size of that we can. But really, That doesn't effect it as much as the collider in there.
If you'd like to change the scale of the capsule, you can take that y scale down. I'll put this down to 0.4 and now it's a bit shorter. We're never going to really see ourselves. We can think of us as a vampire if we happen to have a mirror. We don't reflect. But if you'd like to see it when you're editing the game, be a bit shorter, you can change that scale. Really, the big deal is that in the first person controller, we've changed that height down to 1.6, so it's a little more manageable in the scene. Next, let's look at the movement options.
In here, in the character mode or script, we've got movement, jumping, moving platform, and sliding. I'll open up movement, and there's our max forwards, sideways and backwards speed. This is actually a run, but it may feel quite reasonable to run around an environment. We may also want to change it, so in the gallery the most we can do is a fast walk. Roughly, this comes out to about 13 miles an hour, which is a really fast run in case you've never used your feet. It feels okay in a game because it's really crafted for running around large scale terrain, where it would take quite a long time to walk, let's say, a kilometer, but to be able to run at this speed.
Keeps the game play going. Because we're working in a smaller place, we're going to reduce this speed so it's a little more leisurely, but doesn't feel like we're jetting across the areas. I'll put this max forward, backwards, and sideways speed down to four. pressing four and tab, four, tab and four. Now I've got a limit that's a little bit less in that controller. So when I walk around it won't feel like I'm racing from place to place. Now I'll look at Jumping as well. We'd like to be able to Jump, but there's nothing really here to jump Over there's not obstacles in the way although there may be some art here and there but this default jump is again very tall.
We can jump a full meter and this may mean we'll bang our head on the ceiling. I'll bring this down putting in a base height of .5 and an extra height of .5 so we can do a small jump if we need. It's important to think about how that character reacts. We may want to have our character really be able to race around if it's a large-scale game, or even if our character is a plane, for example. And that speed may get higher and higher. Conversely, if we're playing snail races, we may want that speed to be very, very low.
So that we ooze along. It's a conscious choice to make; how does that controller react? And always assume you can change it. Just because it's created one way doesn't mean it has to be stuck that way. I'll try this out and just hit play, and see how it looks. What I'm looking for here is the feeling of movement, and I'll really be able to tell relative heights when I'm next to walls and also when I'm. Sliding across the space if I got it right. I'm in my space, looking around is still the same, but pressing W for move is a little bit slower.
And when I come up to the doorway, I don't feel as tall. These are 8-foot doors, and when I pass through them and go out to the railing, it feels, well, person-height. Now, I don't want to go through these railings if they don't have colliders on them yet, and I'd fall right off the edge into the endless sky. But, just looking at the heights of things and how it feels to stand out here, I feel, well, like I fit the space a little better. So, that was a good judgement call on changing that player controller. And looking back at the scene I feel like I'm a reasonable person running around this space.
Well a reasonable person who can walk through walls at the moment and there's that bridge of falling off into the sky again. So far though, humor aside about running off bridges and through walls, it's working. So when you're making a player controller, fit the player controller to the game play and think about how a person or whoever your character is. Would really move around that space. And, what does it feel like to be a person of, varying sizes in there. And does your character, fit the place, the immersion your trying to offer.
Get unlimited access to all courses for just $25/month.Become a member
107 Video lessons · 31799 Viewers
90 Video lessons · 22001 Viewers
78 Video lessons · 8110 Viewers
83 Video lessons · 7779 Viewers