I am trying to set up formations for field and I have it mostly working, but there is a consistent issue I can't find the cause for.

I am trying to do this for a 2D game. I want the party to always follow behind the leader in a straight line. When characters spawn in, they always spawn in a little to the right instead of behind the player. The other party member then move into position at an angle. They don't straighten out until I begin to move the leader, but this happens every single time I load into a new room. I probably just didn't set it up correctly, but I haven't been able to find a fix.
  • Hm, I assume your combatant's don't have set up a spawn offset (via their prefab settings)?
    Can you show the settings of your formation?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Here's my settings

    https://imgur.com/a/vN2CQbe

    Each position is set up the same way as position 0
  • Did a quick test in the 2D RPG Quickstart tutorial project and worked fine with that formation.

    I guess you're using the 2D setup (horizontal plane, raycast), how are your combatant prefabs set up?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • https://youtu.be/k2IjmklNWQU

    Recorded a video of my prefab set up and included at the start an example of the issue I am having.
  • Just one thing - when do you use the formation?
    It should be used before spawning, otherwise spawn doesn't use it.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • https://youtu.be/G1iPkmu4aTc

    I did have the formation set up before spawning, but I realized I didn't have the formation setting set up correctly in the node to make it work. Now my second party member doesnt spawn at an angle, but now whenever I stop moving, he makes a 180 degree turn from whatever direction I was facing and looks in the opposite direction.
  • Seems like overshooting the target position and moving back. Which movement component are you using for your combatants and how's the move AI set up?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I checked the combatant and it doesn't have a movement component enabled. When I did enable it, the combatant stopped following the leader.

    For the Move AI it is using, I recorded a video with all of my settings in it

    https://youtu.be/_xjsEfT_zHU
  • edited December 2023
    Move AI looks ok - if the combatant didn't have that set up, it uses the default setup from Combatants > Combatants > General Settings, so, which one are you using here and how is it set up (or have now set up on the combatant)?
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.