Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 oliver-jones · Feb 06, 2011 at 09:15 PM · mouselooky-axisx-axis

MouseLook - Min & Max Problem

Hello,

I have a first person controller in the scene, and I'm struggling to have a restriction in which direction to look in. I've added restriction to the Y axis so I can only loop up 40, and down -40. But on the X - the camera keeps spinning all the away round no matter what Minimum or Maximum restriction I put on it ... Am I doing something wrong?

I've also deactivated the Character Motor (I don't want the character to move - only the head ... and a head can't turn 360 by its self -- this is what I'm trying to fix)

Any help would be much appreciated.

Thanks

Comment
Add comment · Show 2
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 _MGB_ · Feb 06, 2011 at 09:20 PM 0
Share

Can you show the code being used to restrict the rotation?

avatar image oliver-jones · Feb 06, 2011 at 09:51 PM 0
Share

All I'm using is the $$anonymous$$ouse Look Script that comes with Unity. In the inspecter it has a $$anonymous$$in X, $$anonymous$$ax X - $$anonymous$$in Y, $$anonymous$$ax Y ... The X has has no effect

2 Replies

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

Answer by Eric5h5 · Feb 06, 2011 at 11:23 PM

The MouseLook script is on two different objects. This is because X rotation rotates the whole thing, Y rotation only makes the camera look up and down.

Comment
Add comment · Show 4 · 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 oliver-jones · Feb 06, 2011 at 11:55 PM 0
Share

So how would i go about restricting the rotation on X. I tried adjusting the $$anonymous$$in and $$anonymous$$ax on the object with X and still nothing

avatar image Eric5h5 · Feb 07, 2011 at 12:43 AM 1
Share

Wow, the current $$anonymous$$ouseLook script is bugged. Use this one ins$$anonymous$$d: http://www.starscenesoftware.com/stuff/unity/$$anonymous$$ouseLook.txt

avatar image oliver-jones · Feb 07, 2011 at 01:11 AM 0
Share

Yeap - that works fine now! Cheers

avatar image jeffdougherty · Feb 10, 2015 at 02:53 AM 0
Share

Thanks. It's kind of unreal that the $$anonymous$$ouseLook script still has this bug 4 years later, but I ran into the same issue.

avatar image
0

Answer by Nebuch · Jun 25, 2015 at 12:58 PM

I have debug the script; http://answers.unity3d.com/answers/993563/view.html

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

1 Person is following this question.

avatar image

Related Questions

mouse x not working when mouse y in use? 1 Answer

If (increasing/decreasing)? check if something is increasing or decreasing 1 Answer

Look at mouse 1 Answer

Animation blocks my vertical mouse look? 0 Answers

Accelerometer being able to not affect one item 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