Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Unity 2018.3 is now released.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

New Standard Asset Characters - Third Person

Discussion in 'Editor & General Support' started by willgoldstone, Apr 13, 2018.

  1. AkiLap

    AkiLap

    Joined:
    Sep 14, 2014
    Posts:
    21
    Does this support character teleporting within same scene or to different scene?
     
  2. DerDicke

    DerDicke

    Joined:
    Jun 30, 2015
    Posts:
    144
    Just found this threat.
    Just wanne say, keep up the good work! This thing looks promising.
     
    willgoldstone likes this.
  3. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    669
    They should really watch the "Animation Bootcamp: Overgrowth" video describing this for a truly "Generic" controller that can handle nearly _any_ use-case.

    @willgoldstone

    The current controller is looking great!


    I do want to add that the weakest point in the current design is the non-root-motion (speed-based) walking animation for Mario64-style controllers.
    You could try using a "wheel-and-spoke" approach to help this kind of animation -- see below:



    See the video above and watch for a couple of minutes -- it handles this issue elegantly:

    @willgoldstone -- Can we get the basic Mario64 (non-rootmotion) setup working like this so that we can control movement animations better by instead informing our movement animations _with_ physics? (Eg. Walk to Run should be driven by exploration speed's current value, and be blended accordingly.)
    This same locomotion could be applied to animals or vehicles too. Talk about truly generic.

    See the video. Just sayin'.

    PS:
    I suggest watching from the beginning. That describes the basic idea for a "game physics + animation" using truly "responsive" Mario64-style physics -- This enables us to use "physics simulations" while controlling our 3rd person animations procedurally (all without needing root-motion control or heavy blending with animation baking + endless tweaks....)
     
    Last edited: Feb 11, 2019
    willgoldstone likes this.
  4. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    669


    That video (oldie but goodie) pretty much describes a solid way to implement both.
    You can't decouple physics and animation, _but_ you can address them both independently, based on gameplay, all _without_ having to use one to control the other.


    @willgoldstone

    As mentioned above in my previous post --

    Essentially, it is a two-way relationship. Physics _informs_ animation, while Animation _informs_ physics.
    They each do their own thing, separately, based on the information provided from the other -- but the important factor is that neither controls the other; each does their own thing with information from the other which they can each, individually, choose to act on or ignore.

    Please watch that video (above) for a more in-depth look at unifying the two.



    Also, regarding things like "climbing"...

    BotW is great because it makes no assumptions about the state of the physics world or animation.
    It lets each aspect do its own thing.
    E.g. to let the "OG" BotW Character Controller interact with physics like climbing, they used a physics "constraint" glued to the hipbone of Link to attach him to rigidbodies. See below:

     
    Last edited: Feb 11, 2019
    Lars-Steenhoff likes this.
  5. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    1,903
    Yes that is the video, that had a nice balance between the two, very interesring!
     
    awesomedata likes this.
  6. DerDicke

    DerDicke

    Joined:
    Jun 30, 2015
    Posts:
    144
    Wow... connecting Link to tree by dynamically put a joint between him and the tree. This is a very special case and I think it shouldn't be part of the controller. At least not in version 1.0.

    Please don't do it. Even if it appears interesting to develop. Please don't do it.Please don't do it.Please don't do it ;-)
     
    Last edited: Feb 12, 2019
    willgoldstone and awesomedata like this.
  7. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    669
    Careful! -- They might take you seriously on that! -- Unity rarely goes 2.0 on anything like this! D:

    Lol

    Seriously though, for climbing in general, this is pretty much how it's done -- just with a simple raycast (followed by procedural IK/FK placement) instead of a constraint (which, in this case, just replaces raycasting from the torso, hip, or some other location on the character.) The only real difference is that BotW's constraint solution can also handle when geometry suddenly becomes a rigidbody. So why not add it?

    Plus, we wanted "generic" didn't we? We've got moving (and rotating) platforms already (that are not always flat boxes) that someone _will_ inevitably want to climb. What if these boxes suddenly rock or rotate while you're climbing? A more "generic" solution would inevitably be needed to manage this basic motion.
    I say Unity Team should just finally bury Unreal with the best base character controller out there, available as a default. One can scarcely do better than BotW's character controller imho.
     
  8. Onat-H

    Onat-H

    Joined:
    Mar 11, 2015
    Posts:
    40
    A combined navmesh agent / player driven input would be great, as Player characters often transition from gamplay to non playable scenes dynamically.
    Is there currently any way to move the character „exactly“ to a given destination with the nav mesh agent?
    While the agent itself is placed perfectly, the given example controller never reaches the point accurately. This is Important to transition to a timeline with accurately authored animations for example (2 people hugging). I guess the problem is rootmotion in that case. I can imagine a controller like in the overgrowth example would make it easier to handle situations like these.

    Is there any other way for a rootmotion driven controller to reach the exact point?

    Besides of these things I really love the amount of control and the use of scriptable objects. Great work!
     
  9. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    296
    Well while we're at it, lets add underwater swimming and floating in space capabilities too. (can you say feature creep?)
     
    willgoldstone and Vincent13122 like this.
  10. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    2,867
    I think it would be beneficial if the character controller would contain the following abilities as well:
    - waving hello
    - feeding baby(ies)
    - jumping the shark
    - starting the 100m sprint (the run would take over after that)
    - pushing (and fighting) the football (soccer) marshals
    - opening and closing doors and horizontal windows
     
    willgoldstone and Vincent13122 like this.
  11. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    669
    So I'm thinking a triple-jump and a long jump, and maybe flying would be nice as well. Perhaps we could just throw in some Assassin's Creed meets GTAV (all movements of course) with some rudimentary multiplayer capabilities too.


    ...OR... we could just have basic (responsive and easy-to-edit) locomotion with some basic (responsive and easy-to-edit) climbing mechanisms in place that will take care of general physics so that we can finally build on top of this and debug gameplay sometime in our lifetimes?
     
  12. willgoldstone

    willgoldstone

    Unity Technologies

    Joined:
    Oct 2, 2006
    Posts:
    671
    That would be a game centric aspect you'd make yourself, not something for a general character asset like this i'm afraid.
     
  13. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    3,604
    It would be somewhat relevant - as far as I can remember, the old CC kept track of it's position internally rather than relying on the transform, so teleporting it required:

    Code (csharp):
    1. characterController.enabled = false;
    2. characterController.transform.position = blah;
    3. characterController.enabled = true;
    Or something along those lines.

    So the question is more like "can I just set the position of the cc to teleport it, or do I have to notify it in some way that that has happened".
     
    hopeful likes this.
  14. DerDicke

    DerDicke

    Joined:
    Jun 30, 2015
    Posts:
    144
    Huh, good decision. Stay near the root functionality, please.
     
  15. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,315
    Agree or at least recreate the legacy Character controller feature with more improvement/stability and extendability
     
  16. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    207
    Personally what I want to see is an example character that can sit in a car and drive away while retaining its core functionality.This would illustrate MANY examples of mecanim usage including parenting/ childing during runtime. It would also make use of the vehicle controller.

    I think it would be a fantastic case example.
     
    Player7 and 99thmonkey like this.
  17. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    669
    A character controller is not an example -- it is a tool -- a tool that's meant to be used and modified.


    What you (and a lot of others) are looking for is a tutorial on combining animation and physics.

    I know (quality) information on this subject is scarce (and I'm not sure why), but I suggest discovering your own techniques that work ergonomically for you through trial and error (and maybe developing your own generic solution) might be a better idea than "tutorial-seeking" is. Learning through practical experience is always the best -- a "tutorial" really should only be a guide to the basics.

    Most people who do this have developed their own internal systems to make this kind of thing (they've already done) more ergonomic for themselves. For example, I'm not sure I would use Mecanim to do this "driving a car" thing. I would prefer to make a custom (reuseable) more-generic frame-based IK solution that combines all the technologies I plan to use for animation in my projects. Depending on what you're going for, my approach is overkill if your character does nothing but get in a car and turn a steering wheel. Unless he can climb walls, pickup objects in his hand, and do flips too, an IK solution _could_ be a terrible idea.
     
    Last edited: Feb 15, 2019 at 9:44 PM
  18. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    207
    Its very doable with Mecanim, but like usual, Unity tutorials simply don't provide good example to grow yourself from, and there's nothing on Youtube that's free and shows this in action.

    I'm not asking for a complete GTA controller here. Just practical examples. This is a game engine, so showcase that.

    You have to go to better knowledge sources like Penny De Byl's animation courses on Udemy to learn how to even use the system properly. Or pay for the things like Filmstorms patreon.

    Iv tried using Unity's methods to do things and teach myself. But they cant even properly explain how to use their new Prefab system [which I have grown to dislike...] or Mecanim System, or even a USEFUL way to use ECS [which looks really cool, but ultimately useless if you can't figure out how the crap to actually use it.]

    We want BETTER guides in general. If those guides are a proper character controller that's notated via code...so be it. But if you can't sit down a 10 year old in front of your video explaining how to do something simple then frankly....your guides are not good enough.
     
  19. DerDicke

    DerDicke

    Joined:
    Jun 30, 2015
    Posts:
    144
    I think the point is, Unity is not really a game engine. It is a toolset containing common tools for game development. You have a character, an animation component, a NavMesh and physics, all as separate components. You must find a way to combine all of that to make your specific, limited game from it. So there will never be a standard character that will work out of the box. That's too bad, because as you know, 90% of the time is going into building your own basic game specific systems, if you can do it at all.

    I hope the future will see fully functional components usable out of the box, but I don't see it (at least not with Unity).
    I mean, speaking first/third person character controllers we already have a few established control schemes. You *could* already develop a character controller that works in any game, be it racing, fighting, adventuring. But I don't see it yet.
     
  20. willgoldstone

    willgoldstone

    Unity Technologies

    Joined:
    Oct 2, 2006
    Posts:
    671
     
    awesomedata, katoun and Shizola like this.
  21. DerDicke

    DerDicke

    Joined:
    Jun 30, 2015
    Posts:
    144
    Its more like:
     
  22. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    669
    If you are referring to a character controller that -only- combines physics and animation in a more generic way, then yes, Unity Team could _definitely_ make Third Person Controller that "works" in any game (except maybe not a fishing simulation game... or even a 2d-scrolling infinite runner / space-shooter game... and perhaps it might not be suited for any FPS virtual reality game either... etc. etc. -- You get my point hopefully.)

    Ultimately, saying something "works" is just a roundabout way of saying it does what _I_ need it to.
    But when there are thousands of users, what "works" for what _I_ need isn't always generic (or specific!) enough to work for everybody else.


    Truth be told -- I would much-prefer a super-general system that deals with physics and animation (in elegant ways) separately (letting each inform the other, while letting neither dictate the other). This would allow animations to be easily editable, while physics remain responsive (i.e. like the Overgrowth video I posted above handles both -- just put a GUI wrapper around it plz?) It should be "easily-gutted" too (if I wanted to replace parts of it completely.)
    One caveat though -- that nice-looking controller @willgoldstone and his team are working on now wouldn't be a reality if they went solely for what _I_ wanted (a very minimalist controller.) So I can't knock them for it. For what they have, they are doing an excellent job.
     
  23. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    669
    Also -- this is in direct conflict with what you said about wanting a controller that can be used in _any_ game.

    Sorry to pick on you but...

    It can either be "fully-functional" or it can "work with any game" -- If you genuinely think any character controller can provide both of these for you, then you're either delusional, have your own dev team programming for you, or you don't wipe your own bottom. I'm sorry if that sounds harsh, but some people need a reality-check.
     
    Last edited: Feb 19, 2019 at 8:26 PM