• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by Minyi · Nov 10, 2010 at 08:01 AM · charactercontrollerbeginnerfirst-person-controller

Insert First Person Controller, but can not move in Game view

i am a newer for unity, and this is my first project with the problems of first person controller.

when i started with a project from tutorial, building a cube (x=100, y=1, z=100), than i delete main camera in Hierarchy. i put first person controller into scene view, on the cube, and want to see what happened. in game view, i could not move, look around, or jump. there is an error below

"NullReferenceException: Object reference not set to an instance of an object FirstPersonControl.Update () (at Assets/Standard Assets (Mobile)/Scripts/FirstPersonControl.js:64)"

i don't know what happen, it is just a simplest project.

my computer is macbook, and osx 10.5, unity 3d 3

thank for your help.

Comment
Ostagar
qwertyqaz

People who like this

2 Show 7
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Minyi · Nov 12, 2010 at 12:57 AM 0
Share

thank you everyone, i fixed it up. i change the standard assets mobile to one without mobile and it works.

avatar image PurusothM · Dec 22, 2010 at 04:35 PM 0
Share

i have oly the standard assets mobile .. how do i change it to normal one pls help

avatar image thomasw · Jun 10, 2011 at 10:39 AM 0
Share

@PurusothM You need to import the "Character Controller" package.

avatar image jhalt9 · Jan 29, 2012 at 03:14 PM 0
Share

I dont have the character controller package anywhere in my finder

avatar image thomasw · Feb 03, 2012 at 04:12 AM 0
Share

@jhalt9 it isn't in your Finder. Use the menu item Assets->Import Package->Character Controller.

Show more comments

3 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Jopsy · Nov 10, 2010 at 10:35 AM

I think that you are going into the Window panel and clicking game, which you shouldn't do... Just press ctrl+p and it should work... ;)

Comment

People who like this

0 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
Best Answer

Answer by Ostagar · Nov 11, 2010 at 01:28 AM

Assets/Standard Assets (Mobile)/Scripts/FirstPersonControl.js:64

You're using the (Mobile) assets and that's probably not what you want just now. Try Standard Assets / Character Controllers / First Person Controller and everything should work okay. :)

The standard First Person Controller prefab actually requires several parts--a Character Controller physics component, a Character Motor script, and an FPSInputController script. It's often used with an optional Mouse Look script. The prefab comes packed with everything so you can see how it works... then transfer the parts you need over to the GameObject you actually wanted to control.

Comment

People who like this

0 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

Answer by StephanK · Nov 10, 2010 at 08:58 AM

It means that a in line 64 of the FirstPersonControl script you have an unassigned variable. I don't know what's in line 64, but maybe you could post the code. (not the whole script, just the relevant parts) As a quick check you could look at the inspector for the FirstPersonControl script and see if there are any variables set to "none".

Comment

People who like this

0 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Making a character jump with the Character Controller Component instead of Capsule Collider 0 Answers

How do I change the character controller (from the default unity package) to autojump when holding down space(or the jump key)? 0 Answers

Creating a character from a capsule 0 Answers

First Person Controller. (Unity3) 1 Answer

3D Character controller jittering when jumping against a small wall 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges