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 gamegirl1984 · Dec 06, 2014 at 07:40 PM · animationcameracontrols

controls disabled during FPSCamera animation?

I added an animation to a FPSCamera to make it look like the player is being dragged, but during the animation the controls are not working at all. I want to be able to look around, see the enemy pulling you. How do I make it so you can still use the joystick axis's during that animation? (I used legacy animation) and set it to play automatically because its the start of the scene. It then switches to a different camera after the drag scene. And I did use the actual player controller, not just a camera. All the scripts are active for controls.

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
0
Best Answer

Answer by ahmedbenlakhdhar · Dec 06, 2014 at 09:34 PM

You may leave the camera animation as it is, and apply the same controls on another game object, then, make your camera a child of this game object.

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 gamegirl1984 · Dec 06, 2014 at 10:00 PM 1
Share

Wow, that's easy! $$anonymous$$an I need to study more. Thanks sooo much!

avatar image
1

Answer by ZegTronic · Dec 06, 2014 at 10:38 PM

i would suggest creating a bool variable to use the joystick, and when the animation starts make it true

for example:(C#)

 //Set lookAround to false
 
 private bool lookAround = false;
 
 //When you press the "w" key, do this:
 
 if (Input.GetKey("w")){
 
     //Play the drag animation
     animation.Play("Drag");
 
     //You can look around
     lookAround = true;
 }

and also put it so that in order to look around,

you need the input of the joystick && lookAround == true

for example:(C#)

 if (lookAround == true){
 
     float horizontalLook = Input.GetAxis("Mouse X");
     transform.Rotate(0, horizontalLook, 0);
 
 }



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 Graham-Dunnett ♦♦ · Dec 06, 2014 at 10:40 PM 0
Share

I formatted your code for you. Please learn how to do this for yourself.

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

27 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 avatar image avatar image avatar image 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

Why isn't Cinemachine switching between cameras? 0 Answers

How to run 1 animation, then other 2 Answers

how make this script follow a target. 1 Answer

How to mirror flip animation curves in Unity? 1 Answer

Good Game by One Person, Is it Possible? 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