Announcement

Collapse
No announcement yet.

Homing missile with movable target

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

    Homing missile with movable target

    How can I create a homing missile with a pawn as target?
    The Homing Missile function from UE4 allows only static mesh actor targets.

    Has anyone made this yet?

    #2
    No, but I do have an idea for a wire guided projectile that follows your crosshair. For homing I can tell you it will most likely involve a Line Trace to pull the targeted Actor hit and get the actors location. You would need something like Event Tick to continuously update the projectiles velocity vector,using a rotate vector to calculate where the projectile is and where the actor is and rotate the velocity accordingly

    Comment


      #3
      Really simple way then could be to have a static mesh on your pawn and cast to it and get the static mesh.

      Comment


        #4
        You should look up some tutorials in a more known area like for C++ or something in 2D, and then apply the same methods to UE4 in 3D.
        Marketplace Assets

        Advanced Mobile Input: Marketplace Page | Support Thread ――― Easy Input Remapping: Marketplace Page | Support Thread
        Multiplayer Blueprint Chat System: Marketplace Page | Support Thread ――― Closing Credits System: Marketplace Page | Support Thread
        Minesweeper Template: Marketplace Page | Support Thread ――― Maze Creator: Marketplace Page | Support Thread

        Comment


          #5
          Read up about BOIDS you want subset of that stuff for your homing missile.

          Comment


            #6
            Originally posted by Nawrot View Post
            Read up about BOIDS you want subset of that stuff for your homing missile.
            I don't think you would need to go that complex for it at all. Just move it towards it's location at a set speed and give it some lag in direction change so that it follows more along the path the enemy is taking

            Comment


              #7
              You basically described boids steering. And those articles about boids explain it better.

              Comment


                #8
                I solved it as follows:

                My rocket is an actor instead of a projectile. Then I moved this actor with the event tick and the set actor location function to my target location.

                Sometimes it's easier than you thought

                Comment


                  #9
                  Yep easy solution usually does the trick. Definitely if you want something very realistic than looking into boids is a good way to go and tweaking cohesion etc etc but as an initial way then what you have done does the trick very easily.

                  Comment

                  Working...
                  X