• 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 /
This question was closed Jun 15, 2011 at 09:37 PM by Joshua for the following reason:

Duplicate of http://answers.unity3d.com/questions/130516/rotate-around-character.html

avatar image
0
Question by rolltide1098 · Jun 15, 2011 at 05:42 PM · rotationcharactercharactercontrollerrotaterotatearound

rotate around character

I'm trying to rotate the camera around the player character but when i use the if statement to see if the left or right arrows (Input name "Fire1") unity tells me that it cant convert an int to a bool. here's the code.

     if(Input.("Fire1"))
        
        {    
          transform.RotateAround(Vector3.forward * Time.deltaTime * 100);
         }
Comment
Add comment · Show 7
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 Meater6 · Jun 15, 2011 at 08:56 PM 2
Share

@aldonaletto: Why do you close the question but then give no reason?

avatar image Jessy · Jun 15, 2011 at 09:01 PM 1
Share

Why does this horrid website allow one user to close a question, and without a reason, at that? Anyway, your first line is incomplete. Go look at the Input page in the scripting reference for what methods exist in the class.

avatar image Joshua · Jun 15, 2011 at 09:06 PM 0
Share

Guess I'll re-open this question since it seems there was no good reason to close it. @$$anonymous$$eater6 it's not aldonaletto's fault that there was no reason given, when you close a question it makes you think you give a reason when you pick one of the default ones, but it shows none.

avatar image aldonaletto · Jun 15, 2011 at 09:30 PM 0
Share

Hey, guys, this question was posted twice by the same guy; I just closed one of them, and answered the other (by the way, I've just edited it right now). And I choosed the default reason DUPLICATED QUESTION; is it not appearing? Couldn't you guys see the question I left where it was being edited? Strange things are happening in this new UA...

avatar image Joshua · Jun 15, 2011 at 09:34 PM 0
Share

@aldonaletto when closing a question the default reason will not show up on the new UA. You'll have to actually type it out yourself. I guess you were right to lock it though.

Show more comments

1 Reply

  • Sort: 
avatar image
2

Answer by LegionIsTaken · Jun 15, 2011 at 09:17 PM

You cannot do what you just did.

 function Update ()
 {
 if(Input.GetButton("Fire1"))
 {    
 transform.RotateAround(Vector3.forward * Time.deltaTime * 100);
 }
 }

You have to specify what you are dealing with. Is it a button?(Input.GetButton(Down)) or a key(Input.GetKey(Down)) or a axis? When scripting you have to be specific it only dose what you tell it to do. It is like a dog, fun, cute and interesting, but persumably not the sharpest knife in the world.

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

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

6 People are following this question.

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

Related Questions

rotate around character 2 Answers

Mouse control rotate around player 0 Answers

Quaternion, eulerAngles, localEulerAngles Driving me mad 1 Answer

rotation script in unity 3 Answers

rotate player towards the mous 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