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 UnityFan18 · Sep 14, 2017 at 03:50 PM · transform3dfirst-person-controllercamera-lookfirst-person

How to move the rotation of the X and Z axis of a 3D model's head with Mouse Input?

Background Information:

Hello, I have been struggling with figuring this problem. In essence, I am trying to create a first person camera setup. Specifically, I am trying to figure out how to have it so when I move my mouse horizontally (on the x-axis) it moves my character's head side to side. In addition, I am also trying to have it so when I move my mouse up and down (on the y-axis) it moves my character's head up and down. Thus, to start I followed a tutorial on youtube to create the script which moves the character either side to side or up and down.

I have downloaded the "Adam Character Pack" and am currently using the Lu model. The initial problem that I had was the that the Lu's neck transform had a transform orientation that did not have a proper orientation.

alt text

Thus, the script that I used for the tutorial did not work. I ended up attached the mouselook script to the actual "NeckA_MoCap_M" bone/part of Lu's model. I was able to get the x-axis to work and turn the model side to side. However, I haven't been able to figure out how to get the Mouse Input Y to move the Z-axis located on the Transform component under the 'Rotation" row (that is what actually turn's Lu's head up and down) In addition, I have put the camera as a child to the "NeckA_MoCap_M" bone/part of Lu's model.

What I have done so far:

In this picture below here is the original script from Holistic3d's youtube tutorial

alt text

**What I am struggling with:

I haven't been able to figure out how to adapt the script to make it so that the when the player moves the mouse side to side the character's head moves side to side and when the player moves moves the mouse up and down, the character's head moves up and down. I am more looking to be pointed towards the right direction or what I am doing wrong, so I can improve and fix the problem. Thank you for your time and consideration. Lastly, if you need to post more clarification or more information, just let me know.

screen-shot-2017-09-14-at-112206-am.png (513.1 kB)
screen-shot-2017-09-14-at-114200-am.png (173.4 kB)
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

0 Replies

· Add your reply
  • Sort: 

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

93 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 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 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 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

Camera won't rotate while holding WASD keys 0 Answers

Physics based player controller problems 1 Answer

How to trigger scripts with line sight. (3D & First-Person) 1 Answer

How to shake/wobble camera on movement?(3D First Person),How to add a small wobble or shake to my camera when walking(3D First Person) 0 Answers

How to turn object into a particle system and back? 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