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 schetty · Apr 08, 2013 at 06:10 AM · cameramultiple objectsmultiple-monitors

Two view and Two function for the Mouse Cursor

Hi there,

There is two camera view in my scene each camera having the script. One camera having the zoom in-out function for the one object and other camera having the first person shooter. I am moving the cursor on my first camera view the object is rotating and also my first person shooter also rotating, this is the bug.

When i move the cursor on my first camera the object only rotate the first person shooter should not rotate/

When i move the cursor on my second camera view my first person shooter only rotate, should not rotate that object.

Help me to do this.

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 AlucardJay · Apr 08, 2013 at 06:37 AM 0
Share

Your question is almost impossible to understand. Please edit your question, and explain in more detail what you mean by : When i move my mouse cursor to one camera to another camera even after my object is rotating

Watch : http://video.unity3d.com/video/7720450/tutorials-using-unity-answers

Edit : nope, try again. each camera having the script .... what script? The $$anonymous$$ouseLook script? Where are the cameras positioned? Are they both active? What are they showing? What does When i move the cursor on my first camera mean? Are you selecting a camera with the cursor?

Perhaps you should edit your question again, and include a screenshot to make the setup clearer to everyone.

avatar image schetty · Apr 08, 2013 at 07:52 AM 0
Share

first camera having the rotation script for object and second camera having the rotation script for the first person shooter.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Loius · Apr 08, 2013 at 07:42 AM

You need to determine which camera the mouse is in before doing the camera's function. You can use Input.mousePosition to get a Vector2 which represents the mouse X and Y, and then do something like:

if ( Input.mousePosition.x < Screen.width*0.5 ) DoRotation(); else DoShooting();

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 schetty · Apr 08, 2013 at 07:53 AM 0
Share

is there any default function in unity 3d scripting?

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

12 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

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

accessing a script that is on multiple objects 2 Answers

FPS Camera moving by my left mouse button 1 Answer

Top down camera 1 Answer

how to switch camera 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