Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • 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 /
  • Help Room /
avatar image
2
Question by zanscape · Feb 03, 2013 at 02:11 PM · camerajavascript1st personisland demo

How to make a first-person player for my game (like slender or the island demo)

im COMPLETELY new to programming and game making and am learning from youtube etc i would love it if someone could tell me how to: 1) attach the camera to an object (like in the island demo, which i saw on youtube, i dont have it on my laptop) 2) what is the javascript for these basic controls like jump, move the mouse to look around, walk around etc...

please help me

Comment
Add comment · Show 1
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 extrime · Feb 03, 2013 at 02:14 PM 0
Share

Assist/Standard Assist/Character Controllers and drag "First Person Controller" to scene.

4 Replies

· Add your reply
  • Sort: 
avatar image
8

Answer by raycosantana · Feb 03, 2013 at 03:22 PM

Hello

For a FPS you dont need to code anything, Unity already has some good scripts for this. You need to import them into your project Assets/import package/Character controllers.

To use them first we need to add a character controller script to our camera, Like this:

alt text

You can now move the camera with the WASD keys and Jump with the Space bar. But you cant look with the mouse, for that we need to add another script to our camera like this:

alt text

Now you can move and look with the mouse, however you need to create a terrain otherwise your character will fall forever when you hit play. I cant upload more images since the maximun allowed is two but this pretty simple go to Terrain and click on Create Terrain.

Good luck!


mouse look.jpg (88.9 kB)
controller.jpg (96.5 kB)
Comment
Add comment · Show 2 · 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 zhaochenyou · May 18, 2016 at 02:34 PM 1
Share

Hello, I use Unity3 5.3.x, it seems there's no such "FPS Input Controller" and "$$anonymous$$ouse Look".

avatar image g-pechorin zhaochenyou · Aug 01, 2016 at 06:48 PM 0
Share

It's in the (free) "Standard Assets" package, you'll need to "import" that from the store, then, make sure that the scripts you want are ticked in the list

avatar image
1

Answer by CubePhysics · Feb 03, 2013 at 02:22 PM

There is a Package for this that comes with Unity just go to Assets/import package/character controller and their is a first and third person controller in their and you can edit it.

Comment
Add comment · 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
1

Answer by lucas-olai · Mar 10, 2019 at 04:03 AM

I think this has been changed in later updated, and I found the FirstPersonController in https://assetstore.unity.com/packages/essentials/asset-packs/standard-assets-32351

Comment
Add comment · 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
0

Answer by connorwforman · Feb 07, 2017 at 06:51 PM

Asset Package: Assets/import package/character OR Attach the camera to a rolling ball, and the player won't see the ball, so it works!

When making the area, make sure you add a roof, and make it big. Add lighting while in the game-making part, so you can see well, and delete it when done. If the game is supposed to be well lit, then leave it that way.

That is just for movement, sorry for no mouse-look function.

Comment
Add comment · 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.

Follow this Question

Answers Answers and Comments

20 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

speed = transform.rotation * speed; explanation please? 1 Answer

How do you disallow an angle from going to a certain range while rotating? 0 Answers

How to make third person camera were the player walks in the direction in which the camera is directed 2 Answers

Custom Camera Script Toggle Enabled / Disabled 2 Answers

Rotate Camera only Horizontal? 1 Answer


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