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 Booze2use · Feb 19, 2019 at 01:25 PM · rotationcharacterrotateplayer movementaxes

Maybe easy to do, but: How?

Hi

I got 2 scripts to move my 3rd-person character in the way I aimed for:

One for horizontal movement with WASD keys, and one script to rotate the character around his Y-axis by moving the mouse left/right.

Now I try to find a way to bend the character's upper body,

so he can look to the ground or sky.

My Question:

How to rotate his upper body around his X-axis

by moving the mouse forwards/backwards?

alt text

I'm not clear which starting point could be the right or best one to achieve it,

maybe someone could show the direction I should take?

All tips are appreciated

example.png (12.8 kB)
Comment
Add comment · Show 3
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 TreyH · Feb 21, 2019 at 03:26 PM 0
Share

You can do this with the 2D animation tools, specifically by setting up bones and things called Limb Solvers.

Brackeys has a video on them:

https://www.youtube.com/watch?v=eXIuizGzY2A

avatar image RobAnthem · Feb 21, 2019 at 03:27 PM 0
Share

Use I$$anonymous$$ to set the lookrotation of the torso bone and add a clamp factor to prevent turning too much, also use the camera's forward direction to define lookrotation, assu$$anonymous$$g you're looking is directly tied to camera movement.

avatar image zereda-games · Feb 21, 2019 at 03:29 PM 0
Share

pretty sure for basic concept of this take a peak how Unity's Default assets for the char controller and for version compatible with your Unity Version. Newer version use the Packag manager in the windows menu or let the store download the one for your version if older. By my understanding of this question it does exactly what your looking to do right outta the box.. examples included. You may need to write your own base off of their code to do what you want, but its a base item with no licensing stuff included you can edit it at will change names if you like w.e its considered a prefab of sorts for beginners.

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by DatYak · Feb 21, 2019 at 04:26 PM

I think what you are looking for is IK, If you are using a humanoid model/rig is supported, but needs to be setup in code. If you are not using humanoid, then god luck :) (I tried to more animal like IK a while ago and it id not go well) If all you need is up and down rotation, you could make an avatar mask
Both of these could be the solution to moving JUST the upper torso.

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 Booze2use · Feb 23, 2019 at 04:52 PM 0
Share

Hi DatYak

Yes, my aim is just to move

the upper torso as it is illustrated

in the picture above,

and the movement should be

only mouse induced and no animation.

I will try it out as you suggested,

I think also that using avatar mask

could be the solution.

Thanks for your reply

avatar image
0

Answer by Bunny83 · Feb 23, 2019 at 05:20 PM

You should look up Unity's AnimationLayers. Though we have no idea what your "character" actually is. So if it's a rigged model, a single 2d sprite, made up of several 2d sprite parts, ...

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 Booze2use · Feb 26, 2019 at 02:32 PM 0
Share

Hi Bunny83

$$anonymous$$y player character is a rigged humanoid 3d model.

Hope it doesn't takes too long

to solve that issue,

so that I can continue

to work on my game.

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

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

Turning character with transform.Rotate 0 Answers

Rotating a camera that has MouseLook.cs attached 0 Answers

Setting Up Vector and Still Rotating the Character 1 Answer

rotate around character 1 Answer

rotate around character 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