Tactical turn-based - Grid, camera and pawn

Hello everyone !

I will explain my “problem” to you in full in order to have a better approach and give you the context as best as possible.

I created a BP_Camera of type Pawn. The latter is functional and based on Alex Quevillon’s tutorial (https://www.youtube.com/watch?v=SOPvRD2daz4&list=LL&index=3)

Failing to have succeeded in creating an efficient multi-grid system adapted to my needs, I created what I needed manually.



==> What I did here was create my parent box class by adding markers (squares) and box collisions.
The markers will be used to fix my characters in their location and the collision boxes to determine whether the place is taken or not (so that one player does not find himself in the same position as a second).


==> In the end, it will give me this with different lengths and widths.

Where I have difficulty now is knowing how to do so that from my BP_Camera (Pawn), selected as base in my GameMode, to move my characters who are also pawn, to through my map using click.

==> In my BP_PC (Player Controller) I simply copied/pasted the PlayerController Top_Down nodes.
Mouse clicks are therefore normally detected and appear at the targeted location.

However, and I think this is where it gets stuck, it is at the level of the “Get Controlled Pawn” nodes knowing that this is the base of my camera, and “Add Movement Input” knowing that it is based on my camera and not on my characters.

No matter how much I searched on the net and on Unreal, I found very few interesting and functional things.

Additional information:

  • Each player will have 1 character.
  • Max number of players: 1 to 6 (+X bot per missing player).
  • Each player will have their own camera to avoid interfering with that of others (logic)

If I forgot to mention something, please let me know :wink:

Thank you in advance for your feedback =)