This is probably something simple that I am overlooking but I am working on a project and whenever I add a first person controller to any project on any machine, I can mouselook but cannot move around with WASD nor Up DOWN LEFT and RIGHT. Can anyone help? Thanks.
Does the actual “First Person Controller” prefab work for you if you start a clean project and drag one into the scene? This prefab is laid out in a similar way to how your custom player prefab for your game needs to be done. If you’re just dragging this prefab (or the camera controls) onto your existing player then it might act strange. Apologies if this is obvious to you, but I’m not sure how you’re adding it to your project.
The input handling is done (at least in Unity 3) through the FPSInputController script and the CharacterMotor script, while mouselook is done by a pair of MouseLook scripts; one for the camera (for up/down) and another on the controller object (for left/right).
Other than that, check that you haven’t altered the default input settings for the project somehow. The prefab relies on Input.GetAxis(“Horizontal”) and vertical, so if those are redefined or messed up, it won’t work correctly.
I reinstalled unity3d, created a new project and new scene, created a terrain and placed the prefab “first person controller” onto the scene and still doesn’t walk around. It just does mouse look.
Any ideas?
Can you do some debugging? Maybe add some debug output or use some other method to determine (for example) whether the input events are being received and so on?
No, quite frankly.
What OS is this? Does the third person controller work? Do other peoples’ Unity games that you download work? What about the example projects on the Unity site?
Are you sure you’re not using the controller prefab from the “Standard Assets (Mobile)” package? Try the regular one, if so.
I’m running windows 7 and the bootcamp demo works. I checked that it is the regular “standard assets” and not the (mobile) version. I have no idea about this and am stumped about it. It’s getting a little frustrating. It’s going on 2 days now without a resolution for this.
As unlikely as it is, try a different keyboard and try uninstalling any crazy keyboard “drivers” that yours might require. They could be messing with the key up/down events somehow, as some of those drivers enable all sorts of “hotkey” modes when they detect a directx or opengl game running, and Unity might be triggering this. Doesn’t explain why the bootcamp demo works, as that uses the same input methods as everything else from what I can remember, which is going to be something like:
var directionVector = new Vector3(Input.GetAxis(“Horizontal”), 0, Input.GetAxis(“Vertical”));
You could try adding some debug prints around this to see what’s going on, or printing out the values that are being set for the direction vector, or printing out the result of the Input.GetAxis commands directly. Does it behave any differently if you build the project vs running it from the editor Play button?
Wish I could help more, but apart from user-error (which doesn’t sound likely, considering what you’ve described trying) then I’m out of ideas. Does Unity 2 act in the same way? You’re adding the prefab by dragging the object represented with the cube icon called “First Person Controller” from the Standard Assets → Character Controllers folder into your scene, right? It should land in your scene and contain both a camera and a cylinder object nested underneath the parent object. There will be a script attached to the parent object called “FPSInput Controller”, as well as a script called “Character Motor”. If they’re both enabled (and “Can Control” is enabled on the motor) then colour me baffled.
I was using the First Person Controller under Standard Assets → Prefabs. I imported the Character Controllers assets to the project and now when I use the First Person Controller under Standard Assets → Character Controllers and move it up on the Y-axis so its above the terrain, I push play and it falls through the terrain. This happens on 2 computers.
This doesn’t exist for me.
And this doesn’t happen for me. Move the controller so it’s actually above the terrain (ie, in the middle of the terrain, not at 0,0,0) and try again. Make sure that it’s genuinely above the terrain. Make sure that this is a clean project, and that you’ve imported all of the required standard assets.
I’m not sure why I have a First Person Controller under Standard Assets → Prefabs. WIth the first person controller falling through, would that be something to do with a collider missing?
Anyone else know why I have a First Person Controller under Standard Assets → Prefabs?
Thanks for the help btw xomg.
OK, I somehow solved it. I uninstalled Unity3d again, deleted all folders under program files(86) and my documents, deleted everything in the registry. Then I installed it under regular program files instead of program files(86). I started with a new project, created a terrain and imported the standard assets → character controllers, placed the First Person Controller on the terrain and it didnt fall through and I could move around. Before I had imported the whole Bootcamp Demo then created a new scene in that project. Was that the problem?
Don’t do this - that’s where native 64 bit apps go. I’m not sure if it’ll actually break anything, but it’s not what fixed this.
Yes…
Hello, I’m having a similar problem. My Standard Assets folder only contains Terrain Assets and nothing else. I have a Standard Assets (mobile) folder that contains Control Setups, Materials, Prefabs, Scripts, Shaders and Textures.
Do I need to reinstall?
Thanks for the help.
Bill
hello, i have a problem where when I import the character folder in assets,I open it and I go through
assets,
standard assets,
characters, (and in there is first person character)
and apparently you’re supposed to drag ‘first person character’ folder into the scene to load in him/her yet it wont let me .
please help me
i also use the free version if that helps
hello, i have a problem where when I import the character folder in assets,I open it and I go through
assets,
standard assets,
characters, (and in there is first person character)
and apparently you’re supposed to drag ‘first person character’ folder into the scene to load in him/her yet it wont let me .
please help me
i also use the free version if that helps
I just overcame this problem by reading one helpful comment.
My learning project was using iOS build, and I am using FBC Controller without changing anything, thus my mouse stop working!
The solution, make the suitable change for inputs if you want to use ios build
or make sure you are using the PC build
The helpful comment :