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 Hellhound_01 · Oct 04, 2016 at 10:18 AM · c#animationcharacter

Best way to attach two handed objects on character?

Hi everyone,

I've successfully created a new character with Fuse rigged it with Mixamo and imported it to Unity. Now I try to attach a rifle to this character, which uses some of the amazing Mixamo SWAT animations.

I know I've to add this object to the skeleton hips of the model. I successfully add a pistol to the right hand index 1 and archived that it is translated correctly in the pistol idle animations:

alt text

I attach the object using this simple scripled:

 using UnityEngine;
 
 public class AttachObject : MonoBehaviour {
         public Transform attachPoint;
         public Transform obj;
   
         void Start () {
                 obj.parent = attachPoint;
                 obj.localPosition = Vector3.zero;
         }
 }

The weapon object itself is a child of an generic GameObject, which is centered at the origin of the coordinate system. The weapon child object has the required translations and rotations to align the weapon at the right hand.

But how I handle two handed objects like a rifle? I have added the rifle to the same right hand index hip and could move and rotate it successfully that it looks somewhat ok with one of the rifle idle animations. But when I switch to an other animation I have the problem, that the angle of the rifle changes and the result looks weird at the second hand (fingers are overlapped by object mesh or vice versa).

I also tried to use a hip of the second hand als ancor-point and perform a LookAt rotation, but I failed also.

Any help is appreciated. Best regards, Hellhound

BTW: I'm a programmer and by this reason I've less or zero experience with 3d modelling tools. By this reason I prefere solutions without using any pre modelling tasks.

pistol-animations.png (482.4 kB)
Comment
Add comment · Show 2
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 Zodiarc · Oct 04, 2016 at 10:43 AM 0
Share

$$anonymous$$y frist guess would be to use inverse kinematics on the hand which is not on the trigger. https://www.youtube.com/watch?v=EggUxC5_lGE

avatar image Sergio7888 · Oct 04, 2016 at 10:51 AM 0
Share

you can try use 2 FixedJoint conecting each hand to the gun.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

How can i animate my Object? (bones available) 1 Answer

Character returning to start after run jump 1 Answer

Multiple Cars not working 1 Answer

How would I switch between 2 animation states connected to 1 state under input? 0 Answers

mystery RestartLevel function used in official tutorial 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