Created the playercontroller script

I created a playercontroller script to make the player move with the keyboard and rotate the camera with the mouse. The player direction of moving depends on the camera’s angle. I also made the player able to jump when pressing the spacebar.

PlayerController_test

If you want to implement it in your level you’ll just need a gameobject (capsule, model,..) with a charactercontroller component (normally generates automaticly with the script) and a camera object as child.

Implementing PlayerController

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s