Announcement

Collapse
No announcement yet.

Spawning a projectile that follows the enemy AI character

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

    Spawning a projectile that follows the enemy AI character

    The basic concept of what I want to do is pretty simple. I want to have my player-controlled character spawn a projectile that follows the enemy AI until it collides. So to do this, I created a simple character BP for the sphere and set up 360 degree pawn sensing (shown below), and then created an input event in my player-controlled character bp that spawns the sphere. I'm not having any trouble with the spawning of the sphere, but when it's spawned, it doesn't follow the AI enemy like it should. Can anyone help?

    #2
    Do you have a navmesh volume?
    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
      Originally posted by SkeetonYu View Post
      Do you have a navmesh volume?
      Yeah, I already have an AI enemy set up that follows my character around. I tried setting up the same bp for the projectile but it didn't work?

      Comment


        #4
        Are you using projectile movement with character movement? I haven't try this but I think that may cause some issues.
        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


          #5
          Originally posted by BP62REG View Post
          I'm not having any trouble with the spawning of the sphere, but when it's spawned, it doesn't follow the AI enemy like it should.
          So, what exactly it's happening? Nothing or something else? Is the "MoveTo" node executed?
          "I have harnessed the shadows that stride from world to world to sow death and madness."

          Comment


            #6
            Originally posted by EvilCleric View Post

            So, what exactly it's happening? Nothing or something else? Is the "MoveTo" node executed?
            The projectile spawns and then doesn’t move to the AI enemy.

            Comment


              #7
              Originally posted by BP62REG View Post

              The projectile spawns and then doesn’t move to the AI enemy.
              Ok.
              So is the "MoveTo" node executed?
              Are you using projectile movement and/or character movement as SkeetonYu inquired? How exactly are you moving the projectile?
              Last edited by EvilCleric; 05-01-2018, 03:08 PM.
              "I have harnessed the shadows that stride from world to world to sow death and madness."

              Comment


                #8
                Add a floating movement component and see if it works.
                "I have harnessed the shadows that stride from world to world to sow death and madness."

                Comment


                  #9
                  Hi, try this:
                  1. make your projectile a blueprint actor (not a character)
                  2. add a projectile movement component to it
                  3. try like in this blueprint from the picture, see if that works for you
                  FPS Game Starter Kit
                  Retro Game Starter Kit
                  Quiz Game Starter Kit
                  Twin Stick Game Starter Kit

                  Comment

                  Working...
                  X