Search Unity

Character Team should pick up and carry another Character

Discussion in 'Navigation' started by spiceflo, Oct 5, 2018.

  1. spiceflo

    spiceflo

    Joined:
    Feb 4, 2018
    Posts:
    3
    Hello,

    I use in my game different characters which are controlled over a menu by the player. Now I want to create that two characters walk to another caracter (a victim), pick him up and carrying him to another destination. For moving the characters I use NavMeshAgent.SetDestination.

    Do you have any idea how can I realize that idea?


    Thanks and best regards

    Florian
     
  2. Yandalf

    Yandalf

    Joined:
    Feb 11, 2014
    Posts:
    491
    I think that beyond your characters moving to the victim this won't really be related to Navigation. I would handle the picking up by simply disabling navigation on the victim completely and have the characters that pick the victim up replace their separate navigation with a shared one they're pinned to in sort of a "carrying formation". They'd effectively temporarily become children of a shared navigation GameObject until they put the victim down again.