Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Character System

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

  1. RobinS

    RobinS

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

    @voncarp, the transforms scale y and z should be 1. And collider size x needs to be 1.

    @snowboardkid, Venged's solution seems pretty good. I normally rig the mesh to the character as usual in blender. Here is a tutorial :
    http://www.youtube.com/watch?v=4yiC6pEQMAw

    @Venged, thanks for your help, that seems very interesting.

    @mcconrad, glad you figured it out. And thanks for sharing the link here.

    @Lork, the first is already in place when you use idle orbit for example. For the second you could use the orbit camera state and you would need to change the rotation in the HeroCtrl script. Then with pressing S you could trigger a rotation that rotates the character towards the camera's negative look rotation. Something like hero.rotation = Quaternion.Lerp(hero.rotation, Quaternion.Euler(hero.eulerAngles.x, -cam.eulerAngles.y, hero.eulerAngles.z), t);


    Cheers!
     
  2. Lork

    Lork

    Joined:
    Jul 12, 2013
    Posts:
    63
    Thanks, but although that may be useful as a stopgap solution, it's not suitable for an actual game. What I want is something that integrates with the Mecanim system so the character smoothly turns to face the intended direction and keeps moving in that direction.

    I'm looking into a way to implement this myself, but consider this a feature request. Take a look at the way character movement works in pretty much any game to feature an orbital camera going all the way back to Mario 64. That's the behavior that I want and it's what I was expecting from the orbital camera when I bought this character system.
     
  3. snowboardkid

    snowboardkid

    Joined:
    Jun 16, 2013
    Posts:
    17
    Robin,
    As a test, I have even exported the ninja, completely unmodified, from the blender source file (2.63 ninja), set it up with a ragdoll, and matched all settings exactly like the _ninja prefab- and I am still having the same issue. I can move the character, but it plays no animation except the one that is set to "play automatically". That, and any animation I call from my own script, play fine. When I move the camera with the mouse, it "glitches" and goes inside the character for a second, then resumes as normal. Do you have any insight as to what's going on here? This is the ninja character exported from blender with no changes, I don't know what the difference is between this and the prefab. Thanks.
     
  4. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,393
    with the new release if you run cs demo scene and jump in the water you can't get out!

    also, input is as unresponsive, laggy, glitchy, broken as ever. doing a build does nothing to help it.

    go next to one of barriers and try jumping over it. have fun trying to jump over them...

    press e/c/q and often its ignored and you end up having to press the keys multiple times

    basically i cant use it at this point.

    so what gives?

    legacy works great

    other mecanim animation assets that i have work great

    my cpu/gpu doing little to nothing

    what i do notice is that briefly every time you hit a key it goes in and out of cursor mode.

    please fix bugs/issues
     
    Last edited: Sep 17, 2013
  5. hamyshank

    hamyshank

    Joined:
    Jan 31, 2013
    Posts:
    88
    @snowboardkid - It's still behaving like in the video you posted? it looks as if your layers are not set up correctly ie. player, terrain, etc.. i had the same issues you do with the player floating or falling thru the terrain. Player should be layer 8 and Terrain should be layer 10 (someone correct me if im wrong) also, in the inspector under heroctrl you need your ground layer to be the same as what your walking on (ie terrain) and make sure your character is changed over to the Player layer.
    The issue with the camera "glitches inside player then resumes" check capsule collider is Material-Player X-0 Y-1 Z-0 Radius 0.5 Height 2
    Now in Inspector under HeroCamera - adjust the Hero Height (1.4 worked for me, could try 1.3 and so on)

    @im - This asset is far from perfect - but after working with it some my impression is that it is built to be modified/modifiable more than an out of the box ready to go character. What I did right off the bat was disable a lot of the features and then went in to fine tune the basic functionality of the character (walk-run-sprint-jump-turning left&right) then add those other bells and whistles (walljumpomgevadedoubletapclimbclicmblclib) after im finished with that. Getting the core locomotion down you can then start on adding/modifying the very basic aiming system - make a third person crosshair - working bullet/shooting system - what kind of weapons to use, etc.
    Once you get that far in to modifying the system you'll be setting up the wall jump/climb in no time.
     
  6. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,393
    sounds like you just used the animations and didnt use the controllers/scripts and made your own from scratch

    make a release of your build and we'll all buy it... ;)

    Soldier Animation Package for $20 appears to work great out of the box
    https://www.assetstore.unity3d.com/#/content/9246

    still author should work to fix it. perhaps you can send him a copy of your version and work together to get it working for everybody. it works in legacy so its something funky he's doing now that he didn't used to do.
     
  7. hamyshank

    hamyshank

    Joined:
    Jan 31, 2013
    Posts:
    88
    Ok, here is my personal blog/story regarding this character system. I bought it sometime ago and was really overwhelmed with what it did and how the system works, but I knew right away it wasn't working like i wanted it to. But i wasn't really familiar with mecanim - the avatar animator system - and how it was controlled using scripts.
    I used old robot kyle and made my own basic animator (non-legacy) and character controller, throwing in animations from here and there. pretty soon after expanding it some i learned more about how it all worked. Then when I came back to this asset I had a better (far from complete) understanding of how it works.

    After doing all of that I can say for sure that this asset gives you a huge head start on creating your own character that moves and behaves just how you want it to. Will you be able to wall jump and do double back flip evade cart wheels right off the bat? Probably not, but if you knew how to use and expand/modify what does work then you would be pretty happy with what you had.

    edit: I'll try to put together a screencast showing the changes that i've made. most of the modifying happens in heroctrl.cs herocamera.cs and the animator controller.
     
    Last edited: Sep 17, 2013
  8. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,393
    hi well that is very nice of you thanks

    i have to admit i know nothing. this is my 1st unity project. so i have to learn everything. plus none of this did i ever learn in any school. basically i can code in c# that is about it. graphics, animations, fx, sfx, etc 0 experience / education.

    so if you could post the changes or even pm me the files it would be greatly appreciated.

    the darn thing is that legacy very works out of the box without problems. the only thing is i tried to map my mecanim character to it and it dont work at all. i even renamed all the bones to match, but that didnt help at all. i guess mecanim ready characters cannot be used easily with other legacy animations. and legacy animations cannot be easily mapped to other legacy characters. its sort of hardcoded.

    unity needs to do more tutorials in this area. ive done all the unity tutorials and demos which have taught me a lot, but not enough, it sort of brings you almost to the finish line, but not across it. a number of their tutorials end abruptly and are unfinished. even when you go to third party unity support sites its the same thing. they have one after another unfinished tutorial. its like the people behind it get tired of the topic and just begin a new demo/tutorial, leaving the old ones unfinished. i find the best one is the bootcamp, but that one feels unfinished. the 3d shooter, 3d platformer and stealth appears to be the best at having 100% of the tutorial. but their tutorial section remains incomplete, many subjects just not covered.
     
    Last edited: Sep 17, 2013
  9. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    Hi,

    @Lork, yes my example above was meant as a hint and not ready game code. Of course you would have to fit it to your specific needs.
    You can also use a 180 deg turn animation with root motion. Your feature request is noted ;-)

    @snowbordkid, it could be an issue with your export settings or/and your layer setup. As hamyshank said, that are good tips. Does it work for you now ?

    @hamyshank, Thanks for your support help, i really appreciate it ;-)

    @im, i would suggest you to learn the mecanim system, how it's workflow is and so on. You will have a much smoother and more enjoyable time working with the character system. Here is the official tutorial : http://docs.unity3d.com/Documentation/Manual/MecanimAnimationSystem.html
    I agree that it's daunting at first try but well worth learning it ;-)
     
  10. Berir

    Berir

    Joined:
    Mar 23, 2013
    Posts:
    23
    Hey Robin really Great Plug in, I really love it ... been looking at it for a while now ...but in the past it was not compatible with what i need to do ...

    Can you please let me know if I can use your character System with my characters that i made in Maya.

    Thanks
     
  11. mcconrad

    mcconrad

    Joined:
    Jul 16, 2013
    Posts:
    155
    you can. in fact i just finished making an entirely new character this afternoon in maya and rigged it with humanIK, exported as FBX and with a few adjustments, loaded into the character system a few minutes ago and it is animating perfectly fine.
     
  12. Berir

    Berir

    Joined:
    Mar 23, 2013
    Posts:
    23
    Thats great and thanks for the quick reply, well then there is nothing stopping me from getting it now :)

    I do have few more question... is there anything I should be aware of, when modeling in Maya for your Character system ...
    Also I am curious if you would mind sending /emailing your character which you just made in Maya ( of course maya file) ... just as a reference to see the structure/system of the bones and your bone system you made... which obviously works ... I would really appreciate that

    Thanks in advance
    Bernard
     
  13. mcconrad

    mcconrad

    Joined:
    Jul 16, 2013
    Posts:
    155
    well it is not *my* system, it is RobinS'. as for the skeleton, just use the skeleton generator inside humanIK in maya, then move and reorient the bones to fit your model. after they are in place, smooth bind them to the skin (your model's polygons) and usually for low poly models in a t-pose that is it, but for more complex ones you will have to paint the weights to make sure all the bones move the right parts of the mesh to your liking.

    one done, just export the skeleton and mesh to FBX and import into unity. in the import options, make sure to choose humanoid in rig, and create avatar from this object and include extra bones. you will get a checkmark if unity likes the setup, otherwise a tiny X and you will need to remap the bones inside the avatar creator in unity.
     
  14. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    Hi,

    @Berir, You can use standard skeletons with 20 - 40 bones per character. The less the better ;-) The character System will work with any skinned and rigged bipedal character inside Unity.

    @mcconrad, Thanks for your support help! I really appreciate it ;-)

    Cheers!
     
  15. mcconrad

    mcconrad

    Joined:
    Jul 16, 2013
    Posts:
    155
    hey robin, have you gotten a chance to look at how the combo's code works with being remapped to keys instead of the mouse? i am having trouble executing them with any consistency after changing punch to Alpha1 and kick to Alpha3. the keys don't like being held down, which is what activates the combo with the mouse 12.

    also my last issue is with the character easily going thru many walls, especially when jumping or at indirect angle. have you had issues with this?
     
  16. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    Hey mcconrad,

    did you remap it to doAtk1Down and doAtk2Down ? It works this way: if doAtk1Down and punch is not playing set the animation controller parameter Attack1 true. The same way for kick.
    You should check the animation controller when you trigger it. Mouse button down should work the same way as KeyCode.Alpha1 down.

    I didn't had a collision issue yet. You could try to use primitive colliders instead mesh colliders in sensitive areas like spot where two meshcollider intersect.
     
  17. mcconrad

    mcconrad

    Joined:
    Jul 16, 2013
    Posts:
    155
    yup i see the problem. i had them both on keydown, not one on key and one on keydown.

    i will experiment by adding primitive colliders to areas where my mesh colliders are having issues and see if that fixes it. thanks!
     
  18. voncarp

    voncarp

    Joined:
    Jan 3, 2012
    Posts:
    167
    What's the best method to go from falling to flying?
     
  19. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    I haven't tried this yet, but I thought I'd ask here first to see if anyone has already:

    Is it possible to use both the Legacy AND the Mecanim version of the Character System on the one character?

    For example, say I want to use the Legacy version for all the states except climbing (ie. movement, swimming, combat etc), and naturally use the Mecanim version for only the climbing functionality. Is this possible? The reason I'm doing this is because I have already setup my character exactly the way I need using the Legacy Character System; but I want to take advantage of Mecanim's mirror animation for many of the climbing animations which I'll be adding to the system.
     
  20. RobinS

    RobinS

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

    @mcconrad, you're welcome!

    @voncarp, you would need to connect a transition from the falling tree to the fly tree. With the same settings as the transition that goes from the default move tree to the flying tree. And you would need to add the doFly trigger in HeroCtrl to the air region in the _Base() method. So that you can trigger it when not grounded.

    @Hamesh81, i haven't tired it either. If it works i would suggest to turn the unneeded components off while not active. For example : animator.enabled = false; The same for the script controlling it.

    Cheers!
     
  21. mcconrad

    mcconrad

    Joined:
    Jul 16, 2013
    Posts:
    155
    Me again! I am now setting up some NPCs as AI's using RAIN but since HeroBase controller uses things like AxisX Y and a lot more blendstates instead of the standard Speed Direction, do you have any suggestions as to how to proceed? I know I can use a different controller for the AI but i would rather use the HeroBase one since i know it works well with my rig mesh already.
     
  22. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    You can rotate towards your target and move the characters with h horizontal +left/-right and v vertical +forward/-backward.
    http://docs.unity3d.com/Documentation/ScriptReference/Vector3.RotateTowards.html
    Hope that gets you started ;-)
     
  23. MatthiasDeo

    MatthiasDeo

    Joined:
    Mar 16, 2013
    Posts:
    10
    Hi Robin,
    Just wondering how I should go about making it so that the character attacks only once per click and "combos" through multiple clicks as it did in v3 instead of the "hold to attack" of the mecanim version.

    Thanks for creating this great asset!
     
  24. code749

    code749

    Joined:
    Jan 17, 2009
    Posts:
    79
    is it mobile friendly:)
     
  25. Grin

    Grin

    Joined:
    Mar 24, 2013
    Posts:
    18
    Hi Robin, I'm trying to incorporate this asset into my project but i am getting a strange issue where the character is invisible and none of the animations play. when i select the ninja prefab which i dropped into my scene, i can see it's collider outlines but not the actual mesh (see the attached pic). Any idea on what is happening? the demo scenes seem to be working as expected but i can not seem to find any info or tut on how to incorporate this system into my project except for an old youtube clip which appears to be no longer relevant for the current mechanism setup... $Screen Shot 2013-09-22 at 8.49.13 PM.png thanks for the help! really looking forward to setting this up properly and understanding it a little better as it looks like a great piece of kit...
     
  26. Grin

    Grin

    Joined:
    Mar 24, 2013
    Posts:
    18
    okay, rookie mistake...
    I didn't use the provided main camera prefab...
    Now sorted... Thanks!
     
  27. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    Hi,

    You could cache the last animation state or hash and put a timer on it : For example sword1 anim is triggered then myCachedAnim is sword1. Now the time counts to a maximum float or int, if that is reached myCachedAnim is null;
    If you want to trigger swordanim2 only after sword1 is done, then you could just check for the last state and maybe in myCachedAnim and the current anims normalized time.
    Thank you and i hope that makes sense ;-)
     
  28. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    Yes some users using it for mobile already. But you will have to customize the input and i can help with that if you are stuck ;-)
     
  29. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    Hi,

    i'm glad you found a solution. ;-)
    By the way, if you have trouble with visibility of your character, you can check Update when offscreen on the skinned mesh render. And Culling mode on the Animator component.
     
  30. Ron-Wilson

    Ron-Wilson

    Joined:
    Oct 2, 2012
    Posts:
    37
    Robin first off let me say I love what you have done with this asset................it is not without a few flaws but overall it is a great starting point for my needs. I have run into what appears to be a programming bug dealing with using custom characters and that has to do with Capsule Colliders settings appear to change at run time. In my case my Characters scale settings are set to x,y,z all set to 2.5. My capsule collider settings before run time are set to center x=0,y=.32,z=0, Radius=0.15, Height=.77............when play is started if I do not maximize the game field during runtime so that I can observe the inspector window and with my character selected in the Hierarchy Tab and Capsule collider view able in the Inspector tab I see that the Height setting is changed to 2.0 which in my case causes collisions of overhanging objects to be detected which are shorter than the Characters overall height.
    Your Ninja characters collider height is not affected as is mine. This indicates to me that somewhere in code the Capsule Collider height variable is being reset and I don't know where in code this is happening?
    Keep up the good work and thanks for creating the Character System for us to use !
    Ron
     
  31. Ron-Wilson

    Ron-Wilson

    Joined:
    Oct 2, 2012
    Posts:
    37
    ooooops I meant to say which are taller than the Characters height due to the fact that the Collider height is stretched and increased from my setting of .77 to 2.0 at runtime
    Ron
     
  32. Ron-Wilson

    Ron-Wilson

    Joined:
    Oct 2, 2012
    Posts:
    37
    For all the users out there that don't have the graphic programs or skills to create your own characters there is a very use able solution out there to get you started, it is called Autodesk Pinocchio Character Generator and can be found at : Project Pinocchio.Autodesk.com it is free and creates humaniod characters, Male and Female, clothed in varies selectable clothing, varies body sizes, shapes, races, and generates them as FBX models directly use able in Unity as Avatars...........
    Ron
     
  33. mcconrad

    mcconrad

    Joined:
    Jul 16, 2013
    Posts:
    155
    i had this problem too at first, but the solution is to prescale the character before adding the character system collider. that way no matter the size of your model, the collider is still set to the same size and the runtime execution will be ok.
     
  34. Ron-Wilson

    Ron-Wilson

    Joined:
    Oct 2, 2012
    Posts:
    37
    Thanks Mcconrad
    I thought about that and will have to look at the Pinocchio Character Generator program and see if I can do that. I also modified the Collider Height at runtime back to my original size and it took care of the overhead collisions so I think if I knew where in code it was being changed I could simply modify that line of code.
    Using the Pinocchio application I can create many varies characters but I do have a little problem with the fingers of the hands being bent and have to find a simple solution for that..........if you haven't looked into Pinocchio you might like to do that.
     
  35. mcconrad

    mcconrad

    Joined:
    Jul 16, 2013
    Posts:
    155
    you don't want to change it in the code as a lot of the calculations are based on the set numbers. by pre-scaling, i mean in the import settings -> changing the scale value there. find your model in the unity hierarchy, then click on the model tab in the inspector and change the scale factor.

    any modifications you make during runtime will be reset at Start(), so that is not a permanent solution.

    the character system will take over the bones/joints, so any bent fingers that were modified by moving the bones prior to runtime will be overridden by the character controller script and animations.
     
    Last edited: Sep 23, 2013
  36. Ron-Wilson

    Ron-Wilson

    Joined:
    Oct 2, 2012
    Posts:
    37
    Oh let me see if I can figure that one out...............that would save a lot of headaches.........thanks in advance
     
  37. mcconrad

    mcconrad

    Joined:
    Jul 16, 2013
    Posts:
    155
    also if you meant the fingers are being bent BY the character controller during runtime, then that is part of the mecanim animations built into the default system Robin made. in order to change that you would need to either swap out the idle animations that have the bent finger movement or create an avatar mask for the hands that basically tells mecanim to ignore anything in/outside of the mask, depending on the settings. that is also useful to mask out things like head movement, or swinging arms during runs if you are holding items so they don't go thru your model, etc.
     
  38. Ron-Wilson

    Ron-Wilson

    Joined:
    Oct 2, 2012
    Posts:
    37
    Mcconrad , the fingers are bent more than needed during the animations perhaps it is additional bones and some tweaks of muscle adjustments needed during the Avatar creation process........nothing major there.
    Your replys are about 6 hours ahead of mine which indicates to my you may be in Europe?
     
  39. GXMark

    GXMark

    Joined:
    Oct 13, 2012
    Posts:
    401
    Unwanted Camera Jitter on movements are occuring when i place objects in my scene with this camera system. The camera seems to follow the character and affects the rest of the objects in the scene. For example when doing break dancing the objects just behind the character should not jitter about and move with the character movements. Has this been fixed?
     
  40. RobinS

    RobinS

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

    @Ron Wilson, Thank you! ;-)
    In the HeroCtrl script at line : 221 / 222 , the capsule is set to a default setting. center 0,1,0 and height is 2. I did this to match the standard unity human character height and because many user was confused with the legacy CS's Capsule settings.
    You can remove/exclude it if you don't need this automated.

    If your characters bend in a strange way you can use mecanims muscle settings to tweak and adjust your joints there :
    http://docs.unity3d.com/Documentation/Manual/MuscleDefinitions.html

    @mcconrad, Thanks!

    @GXMark, Jittering of the camera usually occurs when the cameras collision layers include your characters layer. Just exclude it and the jittering should be gone.

    Cheers!
     
  41. GXMark

    GXMark

    Joined:
    Oct 13, 2012
    Posts:
    401
    Because the camera has to follow the characters movement it causes the objects in the background to move as well. This looks really awful like a jittering of the objects in the background. Should the camera be disabled during this animation to stop this issue?
     
  42. Ron-Wilson

    Ron-Wilson

    Joined:
    Oct 2, 2012
    Posts:
    37
    Robin thank you for the response and the way you respond to your user always.
    I did find the line of code yesterday starting at line 211 and major setting at 222................. col.height = 2.0f;
    I haven't tried to remove it but was confused why you allowed the user to set it under the capsule collider and then modified it in code at run time.
    That seemed like having a public variable and then in code turn around and set it yourself, which just didn't make sense to me!
    As for the fingers bending I figured it was because my characters are being created using the Pinocchio program that I spoke of and the muscle settings in the Avatar creation process just need some tweaking.............thanks again for such a good asset !!!
     
  43. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    @GXMark,
    Sound like you layers are not setup correctly. The Breakdance is pretty smooth here :D Remember that items the character might be wearing needs
    a layer that is excluded from camera collision too. I had a jittering once while testing this animation and forgot to give the rifle the "Player" layer 8.

    @Ron Wilson, Thanks! Much appreciated ;-) Yes you are right, it was meant to help new users. It seems it causes more confusion than expected. I should remove this with the next update.
    You're Welcome!
     
  44. Ron-Wilson

    Ron-Wilson

    Joined:
    Oct 2, 2012
    Posts:
    37
    Robin,
    Mcconrad may have been correct in that CapsuleCollider is set to col; at line 86 and then later in code col is used several times for example in wallRun and also having to do with grounded and Physics.Raycast setting up the hero.position centerY line 294, also Swimming lift vector3.............after flagging 221 and 222 as remarks the CapsuleCollider Center Y, Radius and Heights were still set as 0,1,0 and Height as 2.0.
    The solution for now appears to select the model in my model folder and in inspector change the scale to 0.02 instead of 0.01 which is common settings for an FBX character'; but the CapsuleCollider still doesn't quit fit my model but it lowers the apparent height of the collider and allows the model to go beneath over hanging objects for now.
    Unless you can point me to exactly how to do the code changes in HeroCtrl !
    I love how modular your code is; for myself I am going to change out the Dance Animations and call animations such as PickUp an object off the ground, open a door, etc or what ever else I want to do instead of dance............all I should have to do is go into Animator and point at different animations I think for now?
     
  45. mikezenox

    mikezenox

    Joined:
    Oct 18, 2012
    Posts:
    55
    Hey, I just set this up with my project and I'm having trouble setting up the ragdoll and getting the climb colliders to line up with my hands while climbing (my character heights vary), and was wondering if you could help. Also during dialog and other GUI events I need to be able to disable player and camera motion, is there any easy way to do this other than disabling the heroctrl and herocam components? As that causes inconsistency while falling, etc.
     
  46. Ron-Wilson

    Ron-Wilson

    Joined:
    Oct 2, 2012
    Posts:
    37
    Mikezenox, I am still having some troubles with the CapsuleCollider issue and seeing my settings changing in Robins code and then applied to my character........I also see that some setting in Rigid body may be altered in Robins code such as Mass being set automatically to 3. I don't yet know what else might be begin preset...........I am having great fun playing with this asset but am still trying to figure much of it out.
    I was able to easily change the Dance animations as described above with no coding just by changing the pointers to new animation which took about 2 minutes. I am having some problems getting stuck in rocks and stuff while falling and then the application hangs there; but in time will figure out what went wrong............there is lots of code here and it's cool to try to alter it some and make it work for our needs. A few years ago we couldn't do this !
    I love what we have as a starting point and hope to twist and bend it to my needs!
     
  47. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    108
    Is there any way to combine animations, for instance I want my character to be able to run while shooting the rifle.

    I disabled the legs in the shoot animation body mask, and that seems to be a step in the right direction. Is there some way to carry on the running animation in the legs while shooting?


    Thanks for any help! This is a seriously deep asset, the more I dig into it the more potential I see... but with this much depth, it is a bit challenging as well as a lot of it is new to me... so thanks for bearing with us Robin, your help is very much appreciated!
     
  48. RobinS

    RobinS

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

    @RonWilson,
    Yes, the collider is used for some calculations but it doesn't change the size of your model. My guess is that the scale comes from the animation clip the character is playing. Does the scale stays the same when you disable the animator and enter play mode?
    Thanks! Glad to hear that ;-)

    @mikeze,
    Unity has a build in Ragdoll generator under top panel : GameObject -> Create Other -> Ragdoll. To adjust the climb height and distance specific to your character proportions, i have build in two variables : climbOffsetToWall and heightOffsetToEdge. I adjust these when in play mode and hanging on a edge, remember the settings and apply them back in edit mode.
    When in dialog, you could build a new camera state. Driving the cam to a dialog position, maybe combined with a fade to black. To disable player input while in dialog you can do something like : if(isInDialog) return; or if(doSprint !isInDialog) In the input part in _Base() and _Combat().

    @cmart,
    Yes, i did this for the Feet Alignment and the Aim/Look. You need Body masks and a layer setup for your animation controller, see docs :
    http://docs.unity3d.com/Documentation/Manual/AnimationLayers.html
    http://docs.unity3d.com/Documentation/Manual/AvatarBodyMask.html
    Higher weight means higher priority.
    Thank you! Always nice to hear that ;-)

    Cheers!
     
    Last edited: Sep 25, 2013
  49. NeythanQueija

    NeythanQueija

    Joined:
    Apr 18, 2013
    Posts:
    18
    Robin,

    I created a terrain for my level, but the player behaves strange when I'm walking on deformed surfaces, even if it's a little deformation.
    The player is set to grounded=false but because of this behaviour it seems like the player is floating on the ground, like falling.
    Is there a way to configure the player to be more precise on terrain deformations?
    I tried do change grounded distance parameter but the player can walk on walls and this is not what I need.

    Thanks!
     
    Last edited: Sep 25, 2013
  50. mikezenox

    mikezenox

    Joined:
    Oct 18, 2012
    Posts:
    55
    Hello again, and thanks for the speedy response! I know how to set up a ragdoll but getting it to work with falling/flying was my issue. Ill take another look when I have the chance so I can be more specific, and thank you for the rest of your advice. I did notice since the mecanim update, certain actions like rolling or grabbing the weapon don't play when I'm in sprint mode, is this on purpose?