FREE Character Controller with mouse look

Over the last few weeks I have been messing with various 3rd person controller script and haven’t found one that I truly love. So I took it upon myself to take bits and pieces of all the controllers to make one easy to use character controller script. There is some setup but nothing crazy.

Step 1:
Import the script into your project

Step 2:
Create an empty game object and attach it to your character and then move the empty object where your players head is

Step 3:
Attach the animation system script to your player

Step 4:
Fill in the parameters of the script

Lock Camera - Do you want the camera to be locked in and have no zoom in or out feature?
Camera Look At Target - this is your empty gameobject you made to be the players head
Idle - This is your idle animation
Walk - This is your walk animation
Run - This is your run animation
Skin Mesh - This is the skin mesh your player uses change this to be a regular render if your not using a skin mesh. This is used for when you zoom in the skin mesh unrenders from the game.
My Camera - This is the camera that will follow your player around, most likely the main camera
Rot Speed - how fast the player turns
Running/Walking/Idle Audio - This is what audio plays when your character is moving or standing still

Once you have all of that setup press play and you have a nice character controller.

You can now walk around using w,s,a,d or arrows, use shift to run and then you can look around by holding down the right mouse button. If you hold down both mouse buttons you can steer your character this way as well. Let me know what you think.

Thanks,
Dex at Taptoon Games!

1143054–43299–$AnimationSystem.cs (7.79 KB)

Hey thanks! I have been looking for something like this for a long time, I was making my own by modifing the original but had several problems with the camera. I will definitely check this out!.

it gave me a few errors

Unable to join player connection multicast group.

Assets/scripts/AnimationSystem.cs(66,14): error CS0103: The name `NetworkingConnection’ does not exist in the current context

Assets/scripts/AnimationSystem.cs(108,14): error CS0103: The name `NetworkingConnection’ does not exist in the current context

Assets/scripts/AnimationSystem.cs(255,14): error CS0103: The name `NetworkingConnection’ does not exist in the current context

Assets/scripts/AnimationSystem.cs(416,24): error CS0103: The name `ConnectMasterServer’ does not exist in the current context

Multiplayer stuff I assume.

also when recompiling the code I got an error at line 408

void SetNetworkAnimation(string animationName, int speed = 1){

Yeah opps sorry I think I uploaded the wrong one. You can remove all that ill repost the new one.

I changed the old one in the top with the new script. I have two version of this script. That one was for my multi player game. The new one is the right one, sorry about that.

dont worry, however you may want to upload it again, because its not working when I click on it, it sends me to a blank page, it may be the forum though I dont know.

EDIT: Nevermind, it was the forum page, with right click/save as works fine.

Here you go, hopefully this works.

1143054–43299–$AnimationSystem.cs (7.79 KB)

Have been testing it a little bit, it great however I may have to adapt a few things for my game. Also the zoom its not working, the camera goes to one side of the character when I press the right mouse button. It may be my character though.

Make sure that your empty gameobject you set for the look at point rotation is all zero. The first time you press the right mouse button it seems to give me a weird rotation, but if you move the mouse up and then try it again it works…weird ill look into this to see what that issue is.

Hi…

Great Script. Can i customize it player look around only Move Mouse(not button press). and also pls include to player Jump key.

Thanks