Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Character System

Discussion in 'Assets and Asset Store' started by RobinS, Jul 13, 2012.

  1. WillModelForFood

    WillModelForFood

    Joined:
    Dec 5, 2011
    Posts:
    143
    I turned ragdoll off but it's still not diving. I think diving doesn't work at all for some reason.
    Also I wish I could jump from ledge to ledge with more freedom like for example also I have to rapidly tap E if I jump onto a wall and want to grab on.

    thanks for the reply I'm excited that you will take care of all this! after fixing some stuff and some polishing this is the best project ever I can't thank you enough
     
  2. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,062
    Thanks! I tried using the muscles but no luck. I'm just going to replace those animations with my own. No big deal. I have the animations. Just need to set them up.

    Couple more issues: When I jumped from the very, very top of the tower, I fell through the ground and got stuck and when I hit the right mouse button while holding a gun, the character kicks after I put the gun away, no matter how long it's been since I pressed it.

    Some of the problems I was having went away when I figured out how to assign the root. Kept getting a null error and couldn't find anywhere to change the root in the inspector so I created a public string called rootbone and used that and it fixed the issues. Would be great if the next update exposes the root in the inspector but at least I know what needs to be done to fix it.

    Lastly, what's the best way to change the timing of the holstering? My draw rifle animation is slower than yours so I'd like to change the time of the switch.

    Thanks again!
     
  3. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    I get the same thing with the kicking. You can change the root in the main script. Robin has a comment next to it about changing it if your character root is different.
     
  4. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,062
    Made a build to test things and figured out a few things. When you have a weapon out (rifle and pistol are all I've tested) and toggle either sneak or walk, you cannot toggle out of that state. You can toggle back and forth between walk and sneak, but not back to run. If you hit the fire button, that pops you back to run. You can draw a weapon while in that state and still be able to toggle out of it, with or without holstering the weapon first, however, it does not play the draw/holster animations in either state and just switches weapons. The animations play, much like the kick, when you toggle back to run, if you can that is. The jump/fall state also causes problems when entered with a weapon drawn - at least a fall from the top of the tower with a gun drawn did - short jumps seem to be fine. Swim also seems to work fine when you enter the water with a weapon drawn.

    Anyway, those are the issues I've found for now.
     
  5. Trollvahkiin

    Trollvahkiin

    Joined:
    Aug 3, 2013
    Posts:
    15
    Would it be possible just to use the swimming from this asset? I have my own character who is in first person only. So would it be possible to attach the swim clarity to him. Would it be as simple as that. Thanks and great work!
     
  6. silverlaine

    silverlaine

    Joined:
    Apr 8, 2013
    Posts:
    8
    Hey Robin, i've been optimizing your code/controllers to suit my needs and i noticed you have 2 big blend trees just to separate sprint from jog, does it have any special meaning? I set it up like this for now and it seems to work well, it even accelerates nicely:

    $Untitled.png

    I use axis and "Sprinting" variable as float instead of bool, this gives me an effect like in fps games (CoD etc.).

    edit: I also noticed that you had "walk_back_l/r" in sprint blend tree and "walk_l/r" in base tree, i'm not sure if it is intentional :)

    Btw those animations are realy beutiful, gj :)
     
    Last edited: Aug 3, 2013
  7. sadicus

    sadicus

    Joined:
    Jan 28, 2012
    Posts:
    225
    $cs4UpdateFail.jpg
    Asset Store
    Here are the results of Updating and Importing the package to a new project. (5x now, rebooted computer, etc.)
    Any ideas as to what is causing this?
    Also notice the Update4.2 green logo has reverted back to 3.3.
    If this is a download error, Will you send me the package directly? (via you send it. google, etc.)
     
  8. Darkworth

    Darkworth

    Joined:
    Jan 19, 2011
    Posts:
    41
    Any plans to sell just the Veteran soldier separately and ready to use with the character system? (ie just the model, not the character system code) I have already spent $125 on the character system when you first released it, I'm not buying it again just to get this model, but if the model is in any way available by itself for less then the cost of the entire kit I may buy that in addition to the kit...
     
    Last edited: Aug 3, 2013
  9. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    Hi,

    @Archania, thank you for your help! 100% right ;-)

    @drewradley, thanks for your report again! Most of this must be tweaked and tailored to you specific gameplay i guess.

    @Trollvahkiin, yes that would be possible. I builded the system as modular as possible to allow this.

    @silverlaine, yes you can tweak and adjust the system to your needs very easily.

    @sadicus, i noticed that too and have no idea why it uses the "old" icons. the System is defiantly the latest version.
    With the update from yesterday v 4.2.
    Sure thing, just send me your invoice number (via mail!) and i will give you a link in return.

    @Darkworth, yes good idea. i will make a new package with just the rigged character when i have some time.

    Cheers ;-)
     
    Last edited: Aug 3, 2013
  10. Trollvahkiin

    Trollvahkiin

    Joined:
    Aug 3, 2013
    Posts:
    15
    Right, I attached the waterfx to my MainCamera and the HeroSwim to my Player. When I start it it gives me "NullRefenceExeption" which I'm guessing it's looking for one of the other scripts which I don't have up because I only want to use the Swim script. How do I fix this? Thanks!
     
  11. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    You would need the logic for input, the Swim(), DiveRotation() and Floating() methods in a script to trigger the swim animation controller transitions.
    WaterFx can be ignored here. I used it to trigger image effects when entering and leaving water triggers in the legacy version.
     
    Last edited: Aug 5, 2013
  12. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,062
    I have been trying to set it up so I can toggle out of sneak with a weapon drawn and the closest I have come is to change line 1966 in the HeroCntrl script from
    Code (csharp):
    1. if(!st.IsName("SneakTree.TreeSn"))//
    to

    Code (csharp):
    1. if(!a.GetBool("Sneaking"))
    However, for some reason, doing this requires multiple presses on the key. I moved the "doSneak = Input.GetKeyDown(KeyCode.V);" to an Update function and that seems to cut down on the number of times I need to press it, but it still requires multiple key presses most of the time. I also tried to change it to

    Code (csharp):
    1. if(!st.IsName("Combat.Rifle.SneakTreeRifle.TreeSn"))
    but that didn't work.

    Any suggestions?

    Thanks!
     
  13. Trollvahkiin

    Trollvahkiin

    Joined:
    Aug 3, 2013
    Posts:
    15
    I'm not very good with C# so is there any simpler way to do this or am I just going to have to use your already made character?
     
  14. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    @drewradley,

    good find! Thanks! Just fixed it and will resubmit now ;-)

    In HeroCtrl : _Combat() :
    Line 1928 :
    Code (csharp):
    1. if(!st.IsTag("WalkTree"))
    Code (csharp):
    1. if(!st.IsTag("SprintTree"))
    Code (csharp):
    1. if(!st.IsTag("SneakTree"))
    Then just assign these tags in each weapon control sub state machine like : Sword.Walktree.TreeW - Tag : WalkTree

    Cheers!
     
  15. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    It's very simple, just give it a try ;-) You can also retarget the whole system to any rigged an skinned character in seconds. Explained here in this video, just skip to 5:26
     
  16. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,062
    Thanks! Works like a charm now!
     
  17. rkruk

    rkruk

    Joined:
    Dec 19, 2012
    Posts:
    6
    hi, i retargeted my character but when i go to play the character is floating off the ground. If i touch the mouse it slides around as if controlling the character. If i press forward on the controls it just slides the character way forward to the water, it then doesn't swim. The only thing that corrects the floating off the ground is if i check on is kinematic, but then the character is on the ground the animations play but the character doesn't move forward with the animation and gives an error that it must be dynamic. How can I fix these problems, I have the latest update. thanks
     
  18. painkiller2007

    painkiller2007

    Joined:
    May 25, 2013
    Posts:
    43
    The combos for various weapon.. for example "Sword" .. they are not easy..
    i have never seen them triggered..
    How to make it easier to make a combo..
     
  19. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    Hi,

    @drewradley, You're welcome!

    @rkruk, did you set the layers like shown in the video? Is the capsule collider set up like in the video ? Is your characters root pivot between the feet on ground level?
    When you compare the ninja is setup to your character, what is the difference? What is the name of your characters root bone?

    @painkiller2007, for example : If you hold the attack1 key, anim1 will be triggered. When you hold or push attack1 while anim1 has finished, anim2 will get triggered and so on..
    Depends on your gameplay.
     
  20. painkiller2007

    painkiller2007

    Joined:
    May 25, 2013
    Posts:
    43
    ohh got it!! you have to keep it on hold..

    Thanks!! got it how it works..

    i was thinking of making it on every click.. like press once.. first will come..then press again..second animation will follow!! thats a bit hard to do!!
    Anyways... i want to thank you...this is a very nice kit!! Helps a lot!! Kudos man!! :D
     
  21. Trollvahkiin

    Trollvahkiin

    Joined:
    Aug 3, 2013
    Posts:
    15
    I'd love to try it but I'm fairly new to unity and started with JS instead of C#. I know they're similar but the complexity of the scripts makes my mind implode. My character is in first person so I don't have to worry about the skin or how the animations work. All I need is the script to make me swim.
     
  22. EmergingMobile

    EmergingMobile

    Joined:
    Aug 7, 2013
    Posts:
    16
    Excellent work RobinS. However I do have one suggestion for future releases. I would put the Combat animations in a different layer with a mask on the legs so that they will work with running and walking.
     
  23. EmergingMobile

    EmergingMobile

    Joined:
    Aug 7, 2013
    Posts:
    16
    Sorry, I posted this before realizing you have a LegsIK layer made and I can just copy the animations over to that.
     
  24. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,062
    What is the best way to reposition the camera slightly to the right of the player so I can see what is under the crosshairs on the center of the screen?

    Thanks!

    edit: got it! I simply attached the camera to an empty GO and moved the camera over to the right .5 units and told the player to use the the EGO rather than the cam. Now I have a nice over the shoulder view which doesn't obstruct the cross hairs.
     
    Last edited: Aug 8, 2013
  25. rkruk

    rkruk

    Joined:
    Dec 19, 2012
    Posts:
    6
    ok, I tried to fix the problem. I tried the muscleman from unity and it worked fine, so I really figured it out that it doesn't work very well when you bring a character directly in from maya. An external export works better on this issue with the fbx. So the retargeting works on a new character, just getting the weapons now to work correctly. Do I need to attach them somehow to the bones, etc? to get them to function when you toggle the q and c buttons? thanks
     
  26. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    Hi,

    @Trollvahkiin, It's all in the source, as i said ;-)

    @EmergingMobile, Thanks! Yes exactly. Very handy also for torso only animations.

    @drewradley, Good solution!

    @rkruk, Yes, to assign weapon models. you just need to parent them to a bone of your choice. Then reference them in HieroCtrl.Weapons ... Done! ;-)


    Cheers
     
  27. sadicus

    sadicus

    Joined:
    Jan 28, 2012
    Posts:
    225
    Hi Robin,
    SC - Direct Link Request 4.2.5 Update
    For whatever reason 4.2.5 Update is giving the same runtime error. Also the Direct download you gave last time worked, BUT the pink world Animation not Initializing error is still happening. Basically i have yet to get a working version.

    ...Untill CS Mecanim is working for me,
    Older version (pre-mecanim)
    What are the absolute necessary files to have in unity to get the Nina character to work in a custom scene?
    I don't need to transfer the animation to another character if i can just use the ninja for now.


    Thanks!
     
  28. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    Hi,

    Seems to be an rare download error. You should definitely send a bug report, to sort this out. What does the error massage say? Do you import it to a new scene? Does it work on a different machine?

    For the legacy system: Ninja, Animations, Control scripts, Prefabs.
     
  29. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Great package RobinS. It would be nice to see a few more weapon options, like staff, greatsword, sceptre, axe, etc for fantasy rpg games :)
     
  30. CaptainChristian

    CaptainChristian

    Joined:
    Apr 3, 2013
    Posts:
    97
    I imported the project into an existing working project. Now whenever I try to import a ninja prefab into my scene he is moving all over the place with no specific target. The sample scenes work fine, tho. Do you know why something like this could happen?
     
  31. quydoau

    quydoau

    Joined:
    Jul 2, 2012
    Posts:
    31
    Hi,

    I downloaded the latest version from the Asset Store, import into a new project in Unity 4 and Unity crashed completely. I tried re-dowload and import several times and Unity crashed every time. Has anyone else had similar problem?
     
  32. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,393
    im interested by too bad there is like n other character that comes with it

    in some other videos i thought i saw like a solder. why not add a couple different characters especially for like the guns

    can other models be plugged in easily enough, i only have unity3d indie. is that good enough to easily replace the ninja?

    also what about other weapons both melee and the kind u fire. like for fps... does it comes with animation and support for that kind of game and not just rpg

    for example support for zooming in with guns and for weapons like rpgs, etc

    i guess 1st person is the weakest view. the guns barely show up, no zoom etc
     
    Last edited: Aug 10, 2013
  33. cyangamer1

    cyangamer1

    Joined:
    Feb 17, 2010
    Posts:
    157
    Hi it's me again. Just updated the asset and I have some new problems.

    Are we supposed to completely re-configure all the muscle definitions for the animation clips? And then afterwards re-hook up all the Motions in the blend trees? Everytime I import the files about two-thirds of the Motions aren't hooked up and several animation clips are "not retargetable" due to lack of Muscle Definitions.

    It sounds like the video I followed was missing a few steps regarding importing the asset and all its files.
     
    Last edited: Aug 10, 2013
  34. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    Hi,

    @Whippets, Thank you ;-), maybe when i have some time on my hands. noted.


    @CaptainChristian, seems like the layers for ground, swim ect. are not setup correctly.


    @quydoau, you can send me your invoice number (via email) and i will give you a link in return. Seems to be a rare download error, afaik you are the second ;-)


    @im, the Veteran is sold separately here : https://www.assetstore.unity3d.com/#/content/10299 . It comes with the full Character System.
    You can retarget the whole system very easy within minutes inside Unity. With Unity free you can not use IK aiming and IK feet alignment.


    @cyangamer1, you should configure muscle clip only on your Avatar on which you want to use the animations. The clips use this muscle settings, just set them to copy from other avatar - your character avatar. Some assets get a reset on reimport. In some cases you can import just some necessary assets from an update. I will write changes to the update log.
    Here are the official docs for retargeting humanoids with Mecanim : http://docs.unity3d.com/Documentation/Manual/Retargeting.html

    Cheers ;-)
     
  35. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,393
    Hi thanks RobinS will check Veteran out that is the video that i saw looked great. :)

    I hate to sound like the newbie that i am ;)

    Do both Ninja and Veteran basically do the same animation, have same character system, just different models/skins or are they different?

    re: You can retarget the whole system very easy within minutes inside Unity.

    is there a video u can point me to that covers this

    re: "With Unity free you can not use IK aiming and IK feet alignment."

    i know unity3d cant do IK, but what exactly does this mean?

    Is there some 3rd party plugin or program that i can use to do the IK stuff or must i get unity pro.

    i would like to get unity pro at some point when i got something, right now im just starting out and really dont have much to show so its hard to justify the cost that at present i could put to better use to get assets like Veteran ;)
     
    Last edited: Aug 10, 2013
  36. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    Sounds reasonable ;-)
    For the aiming you could use the head look controller from Unify wiki : http://wiki.unity3d.com/index.php/HeadLookController
    Should work fine with Unity free.
     
  37. cyangamer1

    cyangamer1

    Joined:
    Feb 17, 2010
    Posts:
    157
    Thanks. Unfortunately it doesn't look like Mecanim wants to play nicely with my existing project. No matter how many muscle clips and IK masks I assign, the bottom half of my character remains crumpled and none of the animations work.
     
  38. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    You're welcome.
    You could also try to remap bones (configure avatar). If this doesn't help either, i would recommend to rig your character mesh to a skeleton that is working well with Mecanim.
     
  39. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,393
    im still interested and was going over the tutorials

    if one gets the ninja and/or the veteran can i use all that comes with the package one downloads from unity asset store in a commercial indie computer game or are there some things that can't be used and/or that must be changed?

    thanks in advance.

    cyangamer1 yeah ive bought a couple models with legacy animation system and the animation stuff they come with works ok as expected, but when u try to get them on someone other system it sort of becomes a debugging problem. i mean i didnt want to have 5 models and 5 different way to activate idle cause each named it differently so i was manually remapping it and u end up with body parts going all over the place and renaming the bones helps but that sort of depends on how the models were done, its a little bit of a nightmare so im going to now try to stick with the same animation system and the same model providers so it works out of the box, they are all the same, etc.
     
  40. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    Once you bought the license from the Asset Store, you can use it commercially in as many Games as you wish.
    EULA : http://unity3d.com/company/legal/as_terms

    You're welcome ;-)
     
  41. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    Just noticed.. is the Reload animation and key input removed? I can't seem to locate it anymore.
     
  42. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Hi RobinS,

    I've got a quick question about MMO handling. If I have a number of other characters within range which all need to use the movement and animation features of Character System, is there a script or prefab that I have to add to these other characters, and what size/load does it represent? Is it reasonable to have 30-50 characters all using the animation part of the Character System without running out of memory, or grinding to a halt :)
     
  43. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    Hi,

    @Archania,
    You're right, the functionality is not in yet but all animations are included. It should be in the next update. If you want to try it yourself, you can add a trigger parameter (bool). Trigger it with (R) from combat, for rifle, bow and pistol. Then add the animations to these states and connect them with in/out transitions ...Done!;-)

    @Whippets,
    30 - 50 should be possible on desktop, if your models have not to much vertices and bone count(s). You can set up LOD meshes and/or use Mecanim's new skinned mesh instancing feature. LOD meshes are included and the ninja's bone count is pretty low ;-)

    Cheers
     
  44. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,062
    I noticed there was an update on the asset store. What all is included in this? I looked for a change log but didn't see one. If there is one, you can just point me too it, otherwise would you mind telling us what changed in this version? I'm trying to decide if it is worth putting it in my project or keeping the version I have which I have edited quite a bit.
     
  45. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    the last update was just to fix the store icons, forgot to mention it in the log. The next update will get a log for sure ;-)
    Thanks for letting me know!
     
  46. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,062
    Thanks! Guess that doesn't require an update to my project. :)
     
  47. NeythanQueija

    NeythanQueija

    Joined:
    Apr 18, 2013
    Posts:
    18
    Is there a way to control the character just with the arrow keys without the mouse interaction (rotation, for example)?
    Thanks!

    *I'm developing the game for desktop and in the future there will be a version for tablets. Thinking if I'll have big problems to adapt it.
     
    Last edited: Aug 20, 2013
  48. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    You can control it with the arrows by default, just replace Input.GetAxis("Mouse X") with Input.GetAxis("Horizontal") etc. It's done within seconds.
    The same method for Tablet controls, just use Joystick or Touchpad position.x instead of Input.GetAxis("Horizontal")/("Mouse X")... Very simple to adapt ;-)
     
  49. NeythanQueija

    NeythanQueija

    Joined:
    Apr 18, 2013
    Posts:
    18
    RobinS, thank you so much!
    I'll keep going. Thanks for the support.
     
  50. SLASH24

    SLASH24

    Joined:
    Sep 20, 2012
    Posts:
    140
    Question: if I've got a bunch of mixamo anims along with my own character, can I easily replace the provided anims with the mixamo one ??
     
unityunity