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 logty · Sep 06, 2011 at 08:54 PM · cameramovement

Completely free moving camera script

I would like to make a script where moving the mouse left rotates the camera to the left, and moving it to the right rotates it to the right, and up makes you look up and down makes you look down, kind of like an airplane script, but I have no idea how to implement this and I do not want it with the Y axis up like most camera movement scripts, I want it to be completely free roaming (imagine you were in space in your airplane, so it move in every direction) I know there should be a simple way of doing this but I have yet to find an answer, any suggestions? Thanks! Logty

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

4 Replies

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

Answer by Waz · Sep 06, 2011 at 10:53 PM

You can't really get 3-axis rotation with a 2-axis mouse, for the obvious reason. If you don't give the player some sort of roll control (Q and E keys being a common choice), they'll just get annoyed by feeling constantly gimbal locked.

I won't down vote the question, since I'm sure others will ask the same invalid question, but rest assured, it is invalid.

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 logty · Sep 06, 2011 at 11:08 PM 0
Share

hmmm... okay, thanks! Not the answer I wanted but it is the answer, I guess I'll have to accept it ;)!

avatar image DaveA · Sep 07, 2011 at 05:57 PM 0
Share

Actually, I've seen more than a few 3d programs that try to induce 3 axis rotation with a mouse. I find it horribly annoying, see my new answer.

avatar image Waz · Sep 08, 2011 at 10:13 AM 0
Share

Certainly you can let the mouse produce rotations that end up as 3-axis rotations. The trouble is that at any given time the user can only change that rotation with 2 degrees of freedom, hence it's frustrating (so funny to watch people twist their mouse, expecting something to happen...

avatar image
0

Answer by DaveA · Sep 06, 2011 at 10:14 PM

Maybe something like this? http://www.unifycommunity.com/wiki/index.php?title=FlyThrough

Comment
Add comment · Show 1 · 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 logty · Sep 06, 2011 at 10:27 PM 0
Share

no, sorry, thanks for the idea! In my case the camera is already moving in a forward direction without any user input, and all you do is move your mouse up to rotate camera up, down for down, left to rotate camera left, and right to rotate camera right

avatar image
0

Answer by EricD · Sep 07, 2011 at 06:01 PM

Use the Wii remote control incl. motion plus. That way you can use the gyroscope to directly move a camera.

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 DaveA · Sep 07, 2011 at 06:04 PM

If you want to fly like an airplane, and you have a 'joystick' with two axis (for turn left/right, pitch up/down), then like Warwick says, you need a 'roll' somehow. That either means using another input, or you can auto-roll (bank). Google banking algorithms or have fun with the math. For an airplane you might want it based on Newtonian physics, but for a space ship you may be able to fake 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

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Camera Movement and angles 2 Answers

Move the camera to the left when the mousecursor is left 1 Answer

Camera Script - Bird's Eye View 1 Answer

Smooth Camera Follow Script, Weird Movement... Please help! 1 Answer

Disable Camera Movement,Stop camera movement 0 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