Thursday, March 30, 2017

Day 27: Audio-only game, post 2

I found a tutorial on how to make a first-person character.

First of all, I needed to make sure my plane (ground) had a collider, otherwise the player will fall through the ground. It already has a mesh collider, so I'm fine.

Next, I made a "capsule" shape, which will be the gravity control for my player. Since my player won't be able to (or need to) jump, that shouldn't be needed, but I'd like it to have gravity just in case.

It can't use gravity without a Rigid Body component.

Next I aligned the camera with the capsule and made the camera a child of the capsule.

After all that was finished, I then made a script to control the movement of the character (explanations in the image).

Now the character can move.

Next class I will add mouse controls.

No comments:

Post a Comment