Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
avatar image
0
Question by Jim · Mar 08, 2010 at 08:52 PM · camerafirst-person

Free floating first person camera

The premade first person camera prefab only offers 360 degrees of vision. How do i edit it so instead of the mouse going off screen to turn 180 degrees left, its as if the whole body turns 180 degrees and the mouse stays on the screen as in most first person shooters. Can i edit this in the free version of unity?

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

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Eric5h5 · Mar 08, 2010 at 09:23 PM

With the first person controller prefab, it doesn't actually matter where the mouse pointer is; it still reads relative mouse movement regardless. You can use Screen.showCursor to hide/unhide the mouse cursor if you like. There's also Screen.lockCursor, which will lock/unlock the mouse cursor to the center of the screen.

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
2

Answer by Cyclops · Mar 10, 2010 at 08:38 PM

While I bow to the expertise of Eric5h5, :) I did want to add something, specifically to the question about editing the script files. Which you can easily do, in any version of Unity. If you look in the Projects tab, under Standard Assets->Camera Scripts, you'll see MouseLook. This is the script attached to the Camera in the FPSController, and you can edit it just like any script.

Note that you will be editing the copy of the script that was installed under your current Projects directory, so any new projects would not have your changes.

The main thing I changed in mine, is to set rotationY * -1, to invert the mouse. Otherwise it drives me nuts... :)

Comment
Add comment · Show 3 · 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 Lipis · Mar 10, 2010 at 09:20 PM 0
Share

@Cyclops I would suggest to you stop using a signature and a quote.. cause this is not a forum-like site.. and you can change your username to something else if you want to sign differently :)

avatar image Cyclops · Mar 11, 2010 at 04:33 AM 0
Share

@Lipis, okay, I'll remove it, just for you - and because you didn't mod me down for it :) Seriously, you're right, I hadn't thought about it, just a reflex to have a sig. Wups.

avatar image Lipis · Mar 29, 2010 at 12:13 AM 1
Share

@Cyclops forgot to upvote this one.. since I missed your comment... :)

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

No one has followed this question yet.

Related Questions

Klick a Button to Fly from A to B. 1 Answer

First Person Camera switch to Third Person Camera on Object 2 Answers

How to make two cameras face the same direction? 1 Answer

How to make an equipped axe charge up to a swing when moving camera? 0 Answers

1st person Camera rotates suddenly in another direction when unparenting from a platform 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