Announcement

Collapse
No announcement yet.

Line formation help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Line formation help

    Hello,

    Im a ue4 noob and not sure where to start when getting Ai to form formations like a Line formation

    If anyone has any idea or even better has an example on how to get AI to form formations i would very much appreciate the help!


    #2
    To line up is simple get all the actors to keep one axis to a value and just change the other axis accordingly.

    For example. My character all gonna line up on X location of 100.
    X will always be 100 because they all line up on X.
    Y first character will be on x100, y100, then I'll just add my gap of 100. So 2nd unit will be x100, y200. 3rd unit will be x100, y300 and so on.
    Checkout Project "TwinBlaster" my current game in progress.
    [FREE] - 2D ROPE! Find out more here!
    Forgive my username... It's an old game name and wrote it down as a habit.

    Comment


      #3
      Thanks for the suggestion but what about rotation? And do you have a example of that system? That is hard for me to understand from written text

      Comment


        #4
        You can experiment with something like this initially:

        Click image for larger version  Name:	rotate.PNG Views:	1 Size:	372.6 KB ID:	1471002

        The only thing it's not showing is the unit selection -> the clicked actor sends its reference to this blueprint via a cast. Click events enabled in the controller.

        Animated end result here.

        edit: most importantly, I should have said that you can rotate a bunch of vectors around another vector

        Alternatively, you can attach actors / components to one another and rotate the whole lot.

        Not sure what you're planning with this, but generally speaking - you'd want to generate a bunch of target points and move individual units there over time. Again, the implementation will depend heavily on what you're trying to achieve. Like with pretty much everything.
        Last edited by Everynone; 05-04-2018, 04:21 AM.

        Comment

        Working...
        X