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. Dismiss Notice

How do you Configure an Animation Pack bought from the Assets Store?

Discussion in 'Input System' started by mikkuelle, Dec 17, 2020.

  1. mikkuelle

    mikkuelle

    Joined:
    Nov 12, 2020
    Posts:
    12
    I recently purchased an animation pack that has a bunch of character animations but no Input Controller for the player to actually control the Character of said Animation Pack. It does have a GUI that holds OnScreen controls. I was wondering however if anyone could tell me how to "get started" on getting the character to move according to the Players Input?


    Thanks in advace
     
  2. Holonet

    Holonet

    Joined:
    Aug 14, 2017
    Posts:
    84
    Go to your character object, then add a "PlayerInput" component. That defines a "player" in the new input system. In that component, you can then select events to fire off when actions occur, and you can point them to methods in whatever script you attach to the character, just like any place you'd use Unity/whatever events.
     
  3. mikkuelle

    mikkuelle

    Joined:
    Nov 12, 2020
    Posts:
    12
    Thanks for that! I couldnt figure it out so i downloaded a dozen programs including the over priced POS (only because i couldnt figure it out) Rewire....
     
  4. tree_arb

    tree_arb

    Joined:
    Dec 30, 2019
    Posts:
    306
    I'm not too farmiliar w the difference of new and old input system, and this post is under input system.. So at the risk of being off target here, I'll post my reply anyway.

    What is the asset?
    Assuming you are downloading 3d animations, search, or YouTube "unity standard assets third person controller" this official asset from unity has a character you can control and you can add new animations you've downloaded.

    Also this free asset might expand upon that but I didn't look past the first 5 seconds
    https://assetstore.unity.com/packag...oller-basic-locomotion-free-82048#description
     
  5. mikkuelle

    mikkuelle

    Joined:
    Nov 12, 2020
    Posts:
    12

    Oh naw, im way past that, even though im still not far at all...I can swap out meshes and stuff just fine. The pack im referring to is the Male Fighter Mechanim Pack. I was trying to create a Charcter Controller with that pack. Theres no docs on it and the Input system no matter new or old was not working. I finally figured it out after code diving for hours. The new input system wasnt implemented in the designers codes. I managed to find where to put the inputs and how to but I am yet to get what i want which is to have the character controller with that animation pack with movement similar to the game Scott Pilgrim. the Beat em style....I also have UFE but that is far too complex and predetermined. At this point, im ready to ask for my money back on the pack or give it to someone who can build what im lookin for.
     
  6. tree_arb

    tree_arb

    Joined:
    Dec 30, 2019
    Posts:
    306
    So if I'm understanding correctly. What I would do if I had to get those animations working w user input like a fighting game...

    I would still pull in the standard assets third person controller guy. Modify the model, animations, camera, and controller script. Using standard assets guy as a base...basically you are just greatly modifying the standard asset one.

    That is how I've done mine anyway.

    It has all the examples of movement and user input to do stuff.
    example: button = play jump animation...its the same process for a punch animation, etc.

    I would also imagine you could find a more in-depth pre made solution somewhere on asset store, but sounds like that's not the case.

    note that I believe creating a really good custom character controller is going to take some effort.
     
  7. Holonet

    Holonet

    Joined:
    Aug 14, 2017
    Posts:
    84
    I might be wrong, but I wouldn't have expected an animation pack to have input wired up regardless of the system used. If it did, it would be predetermining the input you wanted. I would think of input as a separate "asset" from animations.

    You'd typically handle input in a script attached to the character, regardless of which system, and you can put an Animator field and drag in whatever animator you are using, then just trigger the animations or the animator parameters that the animation graph would respond to.
     
  8. mikkuelle

    mikkuelle

    Joined:
    Nov 12, 2020
    Posts:
    12

    Awesome Advice...Havent thought of modding the Standard...Do you have a second to explain how id start that process?
     
  9. mikkuelle

    mikkuelle

    Joined:
    Nov 12, 2020
    Posts:
    12

    If im answering correctly, When you build an animation pack such as such, i assume you use some sort of input device to test the wiring. They have the GUI labeled with buttons that control the player, just not any button keys set. The Player Input script was merged with the character controller itself..if that makes sense.....Theres NO good Beat EM UP Templates or controllers out there so im going off what google ha taught me.
     
  10. tree_arb

    tree_arb

    Joined:
    Dec 30, 2019
    Posts:
    306
    So the GUI is their ideal input for an animation demo.

    For an AI enemy, the input is a script only.

    And finally, for you the gamer, the input is keyboard, controller, or mobile UI.

    So you can see why it's not inherently included if it's only an animation pack.

    Mixamo.com has nice free animations too by the way.

    Designing a solid character controller will take some fine tuning, and is essentially the backbone of your game play in a beat em up. I'm still surprised there isn't at least a paid asset out there for you to get a head start though.



    Instructions Going off memory:

    Download and put standard asset 3rd person controller guy in a new unity project.

    You should now have a guy walking around with keyboard buttons and a jump button with the camera following him.

    The camera is inside or attached to the guy making him 3rd person view.

    Move the camera outside of the character object. Point it at him.

    Done, you now have a character with keyboard input controls rigged that is no longer attached to the camera (assuming you want that street fighter type setup)


    I believe the guy has something like
    Character.cs and PlayerController.cs
    And an animator

    Character.cs updates the animator with bool and/or strings to know what animations to play.

    Player controller.cs sets the values, and I think handles input and/or logic.

    you're going to want to import your fight animations and get them wired up added in the animator. Maybe start by swapping a few with your custom ones

    Take a look at the jump or crouch buttons already used and try to copy that flow.

    Something like Controller script gets keyboard input and updates an isPunching bool. Character.cs gets that, animator is set to that animation… etc.

    you end up w something like this:

    Game object ( player)
    Animator
    Character.cs
    PlayerController.cs (sets animation values w keyboard input)

    Game object (enemy)
    Animator
    Character.cs
    EnemyController.cs (sets its animation value by logic/ai /timers or whatever you want)

    So all your doing is taking two "3rd person controller guy" point only one camera at them. Modify their controllers and adding new animations...and models… and mess w the blend trees… Then u have to get your collisions in there (I ended up going w collider on fist activated on punches).

    … And then what are you just going to do all this and have no rag doll?!? Yep, burn up a day or 3 on that one.

    It's a fun process, but prepared I've learned a good character controller is a fine tuned piece of work.

    One thing you have going for you is if the Scott pilgrim thing is snappy fast comic book like, you shouldn't have to do as much blend tree work.
     
    Last edited: Dec 19, 2020
    mikkuelle likes this.
  11. tree_arb

    tree_arb

    Joined:
    Dec 30, 2019
    Posts:
    306
    Looks like "unity fighting game" on youtube yields a lot of good examples of what you want.
     
  12. mikkuelle

    mikkuelle

    Joined:
    Nov 12, 2020
    Posts:
    12
    Thanks. Working on that now.
     
    tree_arb likes this.