Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Do i need to animate both sword and arm for attack animation?

Discussion in 'Getting Started' started by badassgamer, Feb 20, 2016.

  1. badassgamer

    badassgamer

    Joined:
    Apr 26, 2015
    Posts:
    140
    I need a help in animation that i want my character to swing a sword when button pressed so i have animated an character hand and have a sword without animation do i also need to animate sword too? in Unrealengine4 one dont need to animate weapon but just animate the hand and attach weapon to it and it will move as with hand but what about unity3d? if i attach a weapon to him and animate the both thing. the problem he will be imported with weapon but i dont want that because i want him to hold all kinds of collectable stuff and so please give me a tip how to make this? and the animations are done in blender
     
  2. MurDocINC

    MurDocINC

    Joined:
    Apr 12, 2013
    Posts:
    265
    No, you don't not to animate the sword or import it with character. Once you import your character into scene, you'll see a skeleton hierarchy in hierarchy panel. Expand it down to your hand joint and place all your weapons under it. Then with script you can enable mesh renderer for weapon you want to see and disable for weapons you don't want to see.
    Renderer.enable