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
1
Question by Invernness · Jun 16, 2018 at 01:37 PM · animationaimingbowlimbsaimdownsights

How to move a characters arm when an animation is playing

So i have a third person character that has a bow, when you hold down right click he starts his aiming animation but if u look up or down his hand doesnt move up or down with where your looking it just points straight, if i try to move a limb the animation stops it from moving so i cant moving his arm up or down. I have tried using a mask on his right hand on the aiming animation layer but it still wont let me move his arm. Im quite new to unity but any help would be appreciated.

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

3 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by JonPQ · Jun 18, 2018 at 04:26 PM

you can change bones (transforms) manually after the animation update, using IK or code/script to re-position or angle the joint) Check here for UNity's order of updating everything... https://docs.unity3d.com/Manual/ExecutionOrder.html

Here is important part...as regards to animation.

Rigidbody interpolation applies transform.position and rotation OnMouseDown/OnMouseUp etc. events All Update functions Animations are advanced, blended and applied to transform All LateUpdate functions Rendering

To you can modifying a bone in Update or LateUpdate

Comment
Add comment · Show 2 · 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 JonPQ · Jun 21, 2018 at 07:57 PM 0
Share

Get artist to build animation, such that when ai$$anonymous$$g... both the Object root, AND the reference ai$$anonymous$$g node/transform. Are BOTH pointing Forward, and Horizontal (parallel to each other) this is usually along the Z axis.
Apply movement controls, and then do aim/draw animations to your rig. Then in Late Update (after animations have been applied) Change the transform that you want to manually move. Typically I've done this on the waist or a bone above the nice looking parts of the hierarchy. (somewhere in torso or waist) For ai$$anonymous$$g at specific targets.... you can compare normalized vectors Forward out of muzzle, compared to $$anonymous$$uzzle to Target, You can point your waist node at the same vector to aim. (you might need to add/subtract distance between your waist node and muzzle from the target position also otherwise the ai$$anonymous$$g will be off by the same amount.

If targeted ai$$anonymous$$g is still off.. you can tweak the final weapon bone a little in the hand, or shoot the projectile directly at the desired target point even if its slightly off from the facing direction of the weapon, but I try to avoid doing this.

If you are just moving the arm in response to inputs to aim more left/right / up/dn then no need to worry about extra final tweaks to the orientation, but you will need to add angle limits for max x and y rotation. Remember your animation will reset the angle every frame, so every frame you will have to calculate and apply the transform ai$$anonymous$$g (or angle offsets from the base forward ai$$anonymous$$g position)

avatar image Invernness JonPQ · Jul 11, 2018 at 09:27 PM 0
Share

Thanks for your help. i just used the LateUpdate and a simple look at script to solve this.

avatar image
1

Answer by theANMATOR2b · Jun 18, 2018 at 03:02 PM

Are you using generic or humanoid rig setup? Humanoid rig setup animations can not be edited unless using Umotion or other asset from the store. Generic can be modified as needed.

You could create two poses or animations (external animation package) aiming up and aiming down. Set them in a new additive layer and put them in a blend tree. Then blend between the two animations based on the input of the player.

Pointing up = aim up, Pointing down = aim down.

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

Answer by Invernness · Jun 20, 2018 at 10:12 PM

Im using a Humanoid Rig Setup. Im trying to make animations and using them in a blend tree so if your looking up the up animation is playing and if you looking down then the down animation is playing. Im having trouble lining up the animation and where the player is looking. if the player is looking as high up as he can the bow is just a little lower. Do i have to keep remaking animations til i get the bow to match up? is there any other possible way?

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 JonPQ · Jun 21, 2018 at 07:48 PM 0
Share

you are never going to get it to aim perfectly (to hit a designated target) using animation blending) This can only get you part way there.... (I've implemented this several times with both guns and bows) (See my answer above)... but basically you can use a combination of blended animations (to get you part way there) Then I$$anonymous$$ (if you want to get really fancy) or direct bone/transform manipulation/pointing. I'll add example to my answer above

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

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

TPS Aiming down sights problem 0 Answers

How do I make an aim down sight animation that can be used with mecanim? 2 Answers

How To Play A Different Animation When Bullet Contacts With A Certain Limb? 0 Answers

How to get an animation script working? 1 Answer

Aiming Down the Sights Script (HELP) 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