Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Wrestling/grappling system in unity

Discussion in 'Entity Component System' started by MrZeker, Feb 2, 2019.

  1. MrZeker

    MrZeker

    Joined:
    Nov 23, 2018
    Posts:
    227
    Hi, im Zek, im kinda new to unity, i have been working in a beat-em-up style game, with martial arts. my idea is to have characters with different martial arts, everything is kinda working so far because i found tutorials for all i need, except for any kind of wrestling system.
    What i want to do i the player who is using the judoka character be able to use judo throws but i really have no clue how to make the animations start.
    for my others attack im using a "input.getbutton" and then just playing the animation and enabling the hitboxes in fist and legs, but for the throws the animation in both the attacker and defender must match in position, rotation and timing.
    im not asking for someone to write the code for me, but where to look for info on how to do that? or any ideas - considering im extremely new at unity - .
     
  2. RecursiveEclipse

    RecursiveEclipse

    Joined:
    Sep 6, 2018
    Posts:
    298
    The only animations that work in ECS right now are shader based, unless you're working in hybrid. Hopefully when GDC comes we'll get lots more features, they seem to be building up to a big update.
     
  3. Deleted User

    Deleted User

    Guest

    A fighter would probably be better done in OOP. Since most of the components would actually need to exist from the start, reducing the full impact of ECS.

    That said, being new to Unity and diving into the currently forever changing ECS is probably not a good idea, solid ECS games at the moment are designed with the current features so that if something changes, it wouldn't completely destroy the games functionality.
     
  4. RecursiveEclipse

    RecursiveEclipse

    Joined:
    Sep 6, 2018
    Posts:
    298
    I'm not sure I agree, there is no reason you can't have components added/set when they are created, that's an archetype. Unless you're talking about things like physics/animations which don't work yet, and that's a fair point.

    I think it comes down to how complex your game will be and how willing you are to adapt to API changes. In my case I need to have 10s of thousands of entities in a scene, and ECS has performance which GameObjects/Monobehaviours do not offer. The hardest part about ECS right now is there is little useful documentation, but if you stick with it you'll learn. I'm new to Unity and C# for 3-4 months, the first month or so I didn't even know about ECS, but now I know my way around pretty well. I doubt at this point Unity can change something so drastically that everything will break, most code in components/system behavior is user written.
     
  5. MrZeker

    MrZeker

    Joined:
    Nov 23, 2018
    Posts:
    227
    well, im new to unity, for like 1-2 months and i have no clue about what you guys are talking about.
    I want to make a beat-em-up, so like, theres never gonna be more than 8 enemies at the same time. so its not a big project since it is my first project, but i would like to put some martial arts styles into it.
    im trying to find any simple way in scripts to just position players/enemies in the same base point so animations doesnt just clip or look too far away.

    im also working with humanoid animations, if that serves as something.
     
  6. RecursiveEclipse

    RecursiveEclipse

    Joined:
    Sep 6, 2018
    Posts:
    298
    Might want to ask in Scripting/Animation section, I don't think ECS would provide a benefit for your project in general. You should still be able to use Jobs which might help performance a lot(for example with ai). Anything that has complex animation has to be done the old way for now. There is a conversion tool in the latest update that converts gameobjects in your scene to entities that use the new renderer, but again, no physics so that would only make sense right now for background things/non interactables.
     
    Last edited: Feb 5, 2019
    e199 likes this.
  7. MrZeker

    MrZeker

    Joined:
    Nov 23, 2018
    Posts:
    227
    ohhhh, S***. this is the wrong section then. sorry!
    Thanks for the info man!!!