Search Unity

Character System

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

  1. RonHiler

    RonHiler

    Joined:
    Nov 3, 2011
    Posts:
    207
    Hey Robin,

    Just wanted to say I was very impressed with this asset. I bought it yesterday, and am quite happy with it! Nice work.

    Of course, for my particular project I'll need to do quite a bit of tweaking on the code, but that's to be expected :) It's a great starting point for me. With that in mind, I'm very grateful that A) it's in C#, and B) it's nicely laid out and well commented code. Should be very simple for me to dive into for those reasons.

    Thanks so much for putting this together. I will be sure to recommend your asset whenever I can.

    BTW: have you done any testing with Unity 4 yet? Any issues there?
     
  2. crucio777

    crucio777

    Joined:
    Oct 17, 2011
    Posts:
    61
    great job with v3 out i was just wondering what kind of updates have you planned for the product ahead
     
  3. Gatto_matto

    Gatto_matto

    Joined:
    Feb 15, 2011
    Posts:
    60
    Hi Robin

    Another weird situation :)

    If you press "w"+"space" again and again very fast (yes, i did it!) the charact starts to cut a caper and then another and so on and is unstoppable...

    cheers
     
  4. David_F

    David_F

    Joined:
    Sep 26, 2012
    Posts:
    1
    Could you please update the Demo link. 404 error. I'd really like to test this system out before purchasing.
     
  5. RonHiler

    RonHiler

    Joined:
    Nov 3, 2011
    Posts:
    207
  6. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    @Hamesh81 - I'm pleased to hear that ;-)

    @bbsbot - Hi, Thanks a lot!
    That's not how its designed to be but could be done with some additional work by the user or me.
    Would require a new animation or layer blending.
    I will post a list for the next version when its more mature.

    @RonHiler - Thank you! Very glad to hear that! I'm preparing a U4 DX11 ready version currently. ;-)

    @crucio777 - Thanks you! More on the next version later ;-)

    @David_F - The newest version should be up very soon.

    Thanks again, Ron!

    Cheers
     
    Last edited: Sep 27, 2012
  7. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
  8. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Hi again RobinS, just have a final thing to clarify before making my purchase. I've been watching the setup video over and over again, and it appears that the animations being used (especially for the climbing system) aren't exposed as public variables in the scripts, is this the case? If I would like to use my own animations, or simply retarget and rename your existing clips, is it a straight forward process to update the scripts to recognise the new animations? Since I haven't seen the scripts calling the animations I'm not sure how you're referencing the clips, but ideally for me I would like to declare all the animations as public animation clips so that I can add/change the clips via the inspector. Is this possible?
     
    Last edited: Sep 27, 2012
  9. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    Hey Hamesh81, yes, the clips are not exposed in the inspector to avoid unnecessary memory allocations. You will just have to change the animation names in the HeroAnim class in form of a string, very simple as you will see. Or you can keep the used name and just change the clip.
    Cheers
     
  10. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Ok sure, I guess it will make more sense when I have the actual script in front of me haha. I didn't know that creating public variables for animation clips affects memory allocations. Will let you know how I go.
     
  11. Mikie

    Mikie

    Joined:
    Dec 27, 2011
    Posts:
    367
    Have you tried the animations with an avatar in 4b7?
     
  12. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    Yes, works great! as expected :) The only thing is that the scene lightmap gets messed up and you have to add the layers as usual when importing it to a new and fresh project.
    Layer 8 : Player
    Layer 9 : Climb
    Then : Edit / Project Setting / Physics/ Uncheck Player-Player and Player-Climb
    Shown here :
    $Bildschirmfoto 2012-09-27 um 18.37.36.png
    Now you're ready to go ;-)

    Cheers
     
  13. EricTheCoolDude

    EricTheCoolDude

    Joined:
    Feb 21, 2011
    Posts:
    164
    These controls are incredibly sluggish.
     
  14. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    Well, the package is designed for game developers, it is not a finished game. You can script things to match your taste, tweak variables until you are happy with the result.
    Source code is included and controls are changed in minutes if you're familar with the basics.
    However, i like the current controls !
     
  15. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Just purchased V3 and this is really awesome stuff!! Will make a review shortly on the asset store.

    I would like to make one change to the wall climbing system, I would appreciate some help with this. In HeroClimb.cs line 173 I believe is the beginning of the main climbing function, with the wall climbing starting at line 279. From my understanding, at the moment wall climbing is triggered only if the 'E' key is pressed, the character has collided with a collider named 'climbWall' or 'climbArea' and the HeroMotor.cs is grounded. I would like to trigger the wall climb also when HeroAnim.cs is in either the jumping or falling state and has collided with the 'climbWall/climbArea'. At the moment though, the wall climb is sitting inside a big if 'E' key is pressed, and I'm not sure if taking it out will mess up the things declared underneath it. Any advice as to the best way to achieve this?

    This functionality would allow the player to go into a wall climb once releasing from a ledge, rather than going into free fall until they catch another ledge via the 'E' key. It would also allow a player to begin a wall climb if they have jumped towards a 'climbWall/climbArea', not only from pressing 'E' while being grounded.
     
    Last edited: Sep 29, 2012
  16. UnleadedGames

    UnleadedGames

    Joined:
    Feb 17, 2008
    Posts:
    242
    I'd actually like to have the same functionality as Hamsesh81 so I'm curious on pointers in that regards as well!
     
  17. Mihai93

    Mihai93

    Joined:
    Jul 14, 2012
    Posts:
    213
    Me two i whant that fuctions
     
  18. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    Hey folks, that shouldn't be a problem.I will try to help asap.
     
  19. Mihai93

    Mihai93

    Joined:
    Jul 14, 2012
    Posts:
    213

    Thanks Robins
     
  20. crucio777

    crucio777

    Joined:
    Oct 17, 2011
    Posts:
    61
    even though i don't have the pack yet after playing demo are you trying to do a wall run from ledge to ledge like famous games ?
     
  21. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    @RobinS: Looking forward to it, let me know if you'd like anything clarified

    @crucio777: No no, I am trying to add functionality to be able to climb downwards after holding onto a ledge. At the moment when catching a ledge you can go up, left or right, but you cannot go downwards. The only way at the moment is to drop from ledge to ledge. If it were possible to start a wall climb automatically while falling/jumping, one could release from a ledge, and (assuming a 'climbWall' object is straight underneath the ledge) go from the fall/release straight into a WallClimb state from which they can wall climb downwards. Make sense?
     
    Last edited: Sep 29, 2012
  22. crucio777

    crucio777

    Joined:
    Oct 17, 2011
    Posts:
    61
    we can only go up i think so left right if on a ledge you cannot jump left to right on a ledge (i think so)
    yeah u r trying to go downwards right ?
     
    Last edited: Sep 29, 2012
  23. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    @Hamesh81 - Sorry for the late response, You could use the climb animations backwards, i guess i would end up creating new animations for this behaviour.
    Then you should write a method similar to the edgeclimb one, also a method for checking downwards with player input..
    And i would put it in a new custom climb state, in which you can then trigger the movement and animations also similar to the rest of the climb handling.
    That way the system will stay non destructive, independant and modular.
    I hope this helps.
    Cheers
     
  24. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Hi RobinS, that's not a problem at all but I think you misunderstood me a little. With the current Wall Climb (not edge climb) state it is already possible to climb up and down using the "W" "S" keys so I'm intending to use the animations and input the way it is already setup. I am trying to find where the Wall Climb checks if the player is grounded, I'd like to change/disable this so that the Wall Climb can be triggered both when the player is and is NOT grounded eg. jumping or falling. This would allow a player to drop (using the "S" key) from an "Edge climb" and while falling, if colliding with a climbWall/climbArea collider, be able to start a wall climb (using the "E" key for now, but i'll try to make this automatic later). One grounded check happens on line 304 of HeroClimb.cs but I'm not sure how to change it completely. If I change hMove.Grounded to !hMove.Grounded I can wall climb after jumping up, but not but when I am falling down. Could you advise as to how I could adjust it? Appreciate your help.

    Ps. Also I think it's definitely a good idea to keep the system modular. If you like, when I have made the correct changes I can send the script(s) to you and you can add them in a separate "Extras" folder or something, so if someone wants to use it they can, but it won't interfere with the main system. That's completely up to you though :)
     
    Last edited: Oct 4, 2012
  25. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    Hi Hamesh81,
    Ok, i guess i know what you mean ;-)
    Bridging the gaps with wall climb instead of "leap climbing". The simplest way would be to place wall climb collider between edges to get that behaviour, this should also look cool.
    If you want that automatic you could place the Check() method where the character reaches the top of a wall, without the input get key down condition.
    Reaches end -> check -> climb etc.
    You can do it in many ways but that way you wouldn't change many things. Will test it when im at home.
    You're welcome ;-)
    Thats kind of you, i think some people would appreciate it.
    Cheers
     
  26. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Yes exactly, having wall climb objects between all ledges, except the overhanging ones. The edge climb bridging to wall climb works quite well already without any changes needed when climbing up, it's the down climbing that I'd like to modify. I think all that's needed for the latter is to get a reference to the HeroAnim.cs component inside HeroClimb.cs and add the condition if it's Main State is "Falling" or "Jumping", it can also do a Wall Climb. The difficult part for me of coarse is not that, but knowing where in the script it should go :D

    I had a look at the Check() method like you said and took out the key down to see what it would do. It's brilliant! You can run towards any climbable surface and it automatically starts climbing, whether it be a low wall, wall climb surface, or one of the buildings. The only trouble comes when getting to a ledge, since the ledge pull up animation keeps looping and there's no key to pull up with any more. I'll have look at it tonight and see what I can come up with. Look forward to seeing how you go as well. Thanks RobinS
     
  27. Fufurata1234

    Fufurata1234

    Joined:
    Jun 6, 2009
    Posts:
    47
    Hi,
    I wander if any comprehensive documentation exists? By comprehensive documentation I no way mean some impossibly low resolution video, recorded at quadruple speed and S***ty jazz music in the background. Neither I mean reading some lame source code. Simple question - is there any convenient documentation or not?
     
    Last edited: Oct 5, 2012
  28. dfrauzel

    dfrauzel

    Joined:
    Sep 13, 2012
    Posts:
    3
    Well, I thought the jazz was catchy.
     
  29. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    and I thought the code ran quite well!
     
  30. imRobert

    imRobert

    Joined:
    Feb 18, 2012
    Posts:
    41
    Clean up your own backyard first man : "I wander" ?
     
  31. bmackenzie

    bmackenzie

    Joined:
    Jan 5, 2011
    Posts:
    37
    Hey Guys,

    So I have been eye-balling this system and think it looks great. So I perused the supporting thread and see it's very active, which is great. On question, I have: I see that there are many changes/tweaks still being made, and spoken about on the thread, Will these changes be reflected in a future update to the Character System?

    -Bryan
     
  32. Starance

    Starance

    Joined:
    Sep 27, 2012
    Posts:
    1
    I've been playing around with Character System and have a question or two, if anyone is willing.

    The climbObject positioning seems predefined. What happens is that If I rotate the object say 90* the avatar will rotate too; Image Link

    Also... I tried applying this to my project and had this issue; Image1 and Image2

    as you see, slides up instead. I'm sure I could rotate 'climbWall' around and he'll go the opposite way.

    Another issue, with the 'climbObject', he would just fly through everything.

    I'm wanting to apply this to my own buildings etc etc

    Thanks
     
    Last edited: Oct 7, 2012
  33. mproducer

    mproducer

    Joined:
    Sep 29, 2012
    Posts:
    3
    I am considering buying this but I have a question about it.
    Has anyone used it successfully in the new Unity 4 beta yet?
     
  34. sefou

    sefou

    Joined:
    Aug 30, 2011
    Posts:
    287

    Yep

    work fine wirh Unity 4b8.
     
  35. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    So I finally managed to implement what I was discussing a few posts back. I've been spending the last week or two trying to figure out the climbing system script and now I've come up with something pretty awesome imo!!

    As promised here is the code snippet that does this great functionality. It is actually a lot simpler than I originally thought it would be:

    Code (csharp):
    1. if ((Input.GetAxisRaw("Walk") == 1  (climbState == ClimbState.None))
    2.             || (climbState == ClimbState.None  hAnim.mainState == CharacterAnimations.MainState.Jumping)
    3.             || (Input.GetAxisRaw("Jump") == 1  (climbState == ClimbState.Edge))
    4.             || (Input.GetAxisRaw("Walk") == 1  hAnim.mainState == CharacterAnimations.MainState.Falling)
    5.              hMove.isAfterTap)
    This goes in the Check(); function on line 185 in the heroclimb script. Please note that I have renamed the Character System scripts for my project, and also setup some new inputs, so this isn't a complete drop in replacement. Also notice you will need to reference the HeroAnimation script for this to work.

    What it does:
    Basically, you can walk/run up to any climbable object (wall, ledge, low wall) and if the other (angle distance) conditions are met you will automatically start climbing it without additional input. If you jump towards a climbable object you will auto catch onto it, and if you are falling and press forward you will catch onto the wall again!

    Hope this is helpful to others and answers some of the previous questions ;)
     
    Last edited: Oct 11, 2012
  36. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    Very nice hamesh81. This is a great addition.
     
  37. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    I have a question regarding the one handed animation transitions while hanging, or in the Edge ClimbState.

    I don't quite understand how to control how far close to the end the player can be before the animations change into a one handed one. At the moment my character goes into the one handed animation quite soon, and so if shimmying further the character spends another half a meter or so sliding sideways on one hand until reaching the end and beginning to fall. How can I make this transition into a one handed animation happen closer to the end so the character slides for a shorter distance?

    I believe it has something to do with the relPoint.x values (EdgeMovement function) which are 0.44 0.5 for HangR by default and the same but negative for HangL. I've tried playing with these values but get some quite weird results. Would appreciate some tips :)

    Edit: I also now noticed that when the character is transitioning into the hang animation, they are slid/lerped a certain distance to the side (pretty much until the holding hand is right next to the end). But if the character moves back and transitions back into a two handed hang they do not slide/lerp any distance but simply transition in place. Any way to control the distance of the slide during this transition? Looking forward to some helpful advice, I may post a video later if it is not clear enough what I'm talking about.
     
    Last edited: Oct 20, 2012
  38. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    Do not know if this is mentioned before but i have two problems with this kit at the moment.

    1. When i hold the shift key to run i can not stear the character.

    2. When i hold the shift key to run and run over the simple obstacles the charcter sometimes (most often) fall down and lay there and this is not looking good for a game that the character can climb and make such wonderfull things but falls over a simple stone ;)
    Also sometimes when he fall over a simple stone, he is pushed back i.e 2 meters high and 3 away from where he is falling and also fall down and laying there wich is looking unbeliveable.

    Edit:
    Maybe he can get a new animation where he stands up as a fast solution (now if i hit "e" he suddenly stands there again) !?

    Edit2:
    I do not know why but when i test the stearing i want to stear with the mouse what do not work because i have to use the keys, so i can stear if i use the asset the right way ;)
     
    Last edited: Oct 13, 2012
  39. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    Any luck making a tutorial on taking the animations and retargeting them to another model UnleadedGames?
    Could really use it and very interested in learning the process.
    Thanks!
     
  40. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    There's heaps of material available for this online. Check out this free series which goes through converting existing mocap data to an MB rig.

    Digital Tutors also have some excellent MB training videos, but it is paid for stuff.
     
    Last edited: Oct 16, 2012
  41. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    Cool. I'll check it out. Thanks Hamesh!
    Ya I had a look at the videos from DT. Going to have to watch them now.
     
    Last edited: Oct 16, 2012
  42. deckard

    deckard

    Joined:
    Sep 15, 2009
    Posts:
    158
    I have just purchased this template and I think that this is really a great package.

    I would like to make the controls of the character relative to the camera (I will use the orbit camera).

    Could anyone give me a code snippet which does this?

    thanks a lot.
     
  43. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    Hi Folks,

    Sorry for the silence, now i'm back and ready to help.

    @ Hamesh81 - You are right about the left and right hanging and with this value you can adjust or trigger it before falling.
    You can of course tweak it to your needs, it is also used for leaving climb when reaching the end. If you have a slide effect you could raise the value a little bit to stay in edge climb state a little longer or set the crossfade value a bit higher.

    @ Archania - I've sent you a link with motion builder tutorials. You can also retarget due skinning your character to the included skeleton with blender, which has excellent weighting tools imo.

    @ deckard - Thanks, always nice to hear.
    Do you mean like in resident evil ?


    Cheers,
    Robin
     
  44. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Thanks RobinS. The thing I'm unsure about is exactly what each variable actually does. By default there are 5 float numbers controlling the hanging left/right starting from line 520 in the heroclimb script:
    //Animation Trigger
    0.44
    //Right Side
    0.44
    0.5
    // Left Side
    -0.44
    -0.5

    Since I'd like to have the animation be triggered only at the very edge I changed the floats for either sides from 0.44/-0.44 to 0.49/-0.49. But this didn't seem to have the desired effect, and the character was still on one hand when quite far from the end. I'm not sure what the Animation trigger value does exactly, and how it effects both of the sides. Is that what I need to change?
     
  45. deckard

    deckard

    Joined:
    Sep 15, 2009
    Posts:
    158
    Hi Robin,

    I mean like in most third person games like the Uncharted series for example.

    I finally managed to do this using the following code:

    // Read joystick Axis input
    Vector3 inputVector = new Vector3 (Input.GetAxis ("Horizontal"), 0,Input.GetAxis ("Vertical"));

    // Make joystick input relative to camera
    inputVector = Camera.main.transform.TransformDirection (inputVector);

    // Make joystick input relative to player character
    inputVector = transform.InverseTransformDirection (inputVector);

    // Apply joystick input to the player character
    curVelocity = inputVector.z * ForwardVec(hit) + inputVector.x * hero.right;
     
  46. parnell

    parnell

    Joined:
    Jan 14, 2009
    Posts:
    206
    I'm really interested in this package but can't get the demo to load. I keep getting a 404.
    I noticed in the rig video it was using blender...can I use Max instead? Do the bones need to just be named and setup the same?

    Thanks
    B
     
  47. deckard

    deckard

    Joined:
    Sep 15, 2009
    Posts:
    158
    Hi Robin,

    I am now confronted to a new problem. I am currently trying to retarget the animations of the ninja to my character in Motion Builder but I can't get it to work properly, even with Mia, the default Motion Builder character.

    After the characterization of the ninja and the creation of a control rig, I try to retarget the animation from the ninja's control rig to Mia's control rig. The animation is retargeted but the arms of Mia's, although animated, remain extended, roughly like in her T-Pose.

    This may be due to the fact that the skeleton of the ninja is a bit strange, or because the rotations of the bones are not at zero in T-Pose.

    I believe that you wrote in one of your previous posts that you would be able to do a tutorial about the retargeting of the ninja in Motion Builder. I would be very much interested in this.

    By the way, Motion Builder requires the first frame of the animations to be in T-Pose. Would you be able to supply us with a version of the animations which includes a T-Pose at first frame?
     
  48. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    @Starance: Not sure if this helps, but I found when rotating the climbobject colliders etc their y rotation value always needs to be positive otherwise the system doesn't recognise it as a place to climb to. So for example, instead of rotating it -180 do 180, or instead of -90 do 270. If you do this via the inspector it's much easier to control whether the value is a positive or negative number. You can then do the final small tweaks using the rotation tool. In hindsight I think this is very smart programming because if you have a building interior, the last thing you want is to be able to climb the outside wall from the inside of the building, if that makes sense.
     
    Last edited: Oct 21, 2012
  49. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    @Hamesh81 - You're welcome, I made some tests you can raise it to 0.48 if you want.
    I used this settings:
    line 499 : 0.44
    502 : 0.48
    514 : -0.48
    and to reset it in line 562 : 0.48 when moving backwards.

    @deckard - Hi, Im glad you found a solution.
    I'm not using motion builder, but the source file is included which makes retargeting a breeze.

    @parnell - The demo in my signature works for me, tested it 1 min ago in safari.
    https://dl.dropbox.com/u/39674817/CharSys_v3.1/CharSys_v3.html
    It should work in max without any problems, the package includes all FBX files plus the source.

    @Starance - I sent you an email. seems to be a wrong climb object setup. Can you dropbox me the the project so i can take a look? Also you can build prefabs from the climb objects in the demo scene and use these for building your scene if this helps.
     
  50. parnell

    parnell

    Joined:
    Jan 14, 2009
    Posts:
    206