crouch attack collider 2d question

i’m making a 2d sidescroller and right now everything is working perfectly, up until now anyways. my character can attack just fine. I have a gameObject prefab that initiates and kills itself, but does damage to an enemy if it collides while it exists. It spawns from a Transform gameObject that I linked up to the character, much like you would with a groundCheck. Like you drag the indicator that’s beneath the feet of your character. So far, so good. But here’s my latest conundrum. When I duck, the indicator that tells the collider where to spawn, doesn’t follow the character when he crouches. I can attack, but the location of the attack is in the same position as when my character was standing, even though the indicator has followed the character. I set it up that way in the animator. So my question is, how do I get the collider to follow my character’s crouching state, so that the attacking is at a lower height? Like, what do I have to look up or learn in order to perform this task correctly?

You could simply add two Vector2 to your script. One representing position when your character stands and second when he crouches. Then you would reposition the indicator based on the state that your character is in.

You could also just make second indicator and use it when you´re crouching, but the first solution is better because you can interpolate and therefore make transition smoother.