How to set positions of bubble in bubble shooter game?

I am making bubble Shooter type of game in 2D. When i shoot the bubble i want them to fir in the place there but it’s not getting set properly can any one guide me with this? Does hexagonal grid can solve my problem? n if yes how to make it n get the bubbles fit in to it

You just instantiate the bubble using the player’s transform.

Instantiate(bubble, transform.position, transform.rotation);

This would be in the player’s script.

I won’t write the code entirely for you but i’ll try to help some

you’ll want to set the position of each bubble based on the prior bubbles position.

so you’ll use a for loop inside a for loop to control the x and y position and increase the x by 1 each time and the y by one and because you want a hexagon the x by .5 each time it loops.

for y loop
    y + 1; x + .5
    for x loop
      spawn object using x and y