- Home /
Why won't my rigidbody fps controller move?
Okay so I have seen a lot of questions regarding similar issues but none are exactly the same so let me detail what I have done.
First off, I'm using Unity 5.6.4f1.
I have imported the characters, cross-platform input, and environment standard assets. I have added a quad to the scene to act as the ground and it has an active mesh collider. I can add a Rigidbody FPS Controller prefab and works perfectly fine. The WASD keys allow me to walk around and looking around with the mouse works as expected. I can also remove the RigidBody FPS Controller prefab, create a capsule object, add a RigidBody, add a capsule collider, add a camera, add the RigidBody FPS Controller script to the capsule, link the camera to the script, and everything still works fine.
Now here is my issue. If I remove capsule and children, add in a mesh (tried my own and some from store), add a rigidbody to the mesh, add a capsule collider to the mesh, add a camera to the mesh, add the rigidbody fps controller script to the mesh, and link the camera to the script, the WASD no longer work when I go to test the game. I can still look around with the mouse just fine, but I cannot move. Gravity is also still effecting the player if I put them in the air.
I have set the rigidbody settings to be the same as those on the rigidbody fps controller prefab, and I have added zero friction physics material to the mesh's capsule collider. I have no clue why it isn't working. Anybody have an idea?
Answer by spidermancy612 · Feb 09, 2018 at 03:57 AM
My kneejerk reaction says it has to do with your version of the engine. I believe current Standard Assets are build for the more recent versions of Unity, and regardless you really should get on Unity 2017.
Assuming I'm wrong with the engine version, my guess is that it has to do with how you're setting up the object. You said you removed the children and then added your own mesh and rigidbody. Are you adding these components to the parent object or some child on it? Also could we have a picture of your inspector and hierarchy to get a better idea for how the object looks like?
Thanks for your reply. I originally did upgrade to Unity 2017 but for some reason the editor was extremely laggy to the point where it was unusable, so I went back. If that issue has been addressed then I will gladly upgrade again.
I actually removed the capsule object completely. Then I added a character to the scene. The character has 2 children; the mesh and the armature. I added the camera as a child so now it has 3 children. To the parent object I added the capsule collider, rigidbody, and rigidbody fps controller script.
Here's a picture of my hierarchy: https://imgur.com/a/$$anonymous$$gPga
Here's a picture of my Player object in the inspector: https://imgur.com/a/8fchz
Your answer
Follow this Question
Related Questions
Unity3D HELP! How can i pickup/hold/throw object when im rolling ball? 4 Answers
How to use character controller to push down hinge joint properly 1 Answer
Custom Character Controller Errors? 0 Answers
Unity3D HELP!!!!!!!!!!!!!!!!!!!!!! : How can i make physics controller jump/PLAY SOUND. 1 Answer
RigidbodyFirstPersonController and external forces... 0 Answers