Announcement

Collapse
No announcement yet.

Sonic the Hedgehog Homing Attack

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

    Sonic the Hedgehog Homing Attack

    This is my first time making a game, in general, and I'm trying to recreate the ability shown in this video.



    I've already added homing flags to all the blueprint actors I want to enable for this, but I'm wondering if there should be a certain point on the object Sonic should attract himself to, like a component, instead of the center of the actor. I think a cylinder would work as the detection mesh, because there is a maximum height, both above and below, that Sonic should be able to homing attack to. At the same time, I'm not sure about this because the direction he's facing has a huge say on which object he locks on to. If he's facing a far away object, but an object behind him is very close to him, he will attract himself towards the one in front of him. Sonic should be attracted to the nearest object with the homing flag within the collision detection mesh. After jumping, once an object is found and the jump button is pressed a second time, Sonic locks onto that object only and moves foreward for a maximum of one second, so that if the object doesn't trigger or is moving faster than he is, he doesn't move towards the object forever. Anyone know how to do this?

    #2
    Hello, are you doing a sonic game or trying to recreate the movement?

    I have a Sonic framework (link below), but I still didnt done the homming attack, but I have some ideas on how it can be done:

    There is a blueprint node called MultiCapsule Trace by Channel, that traces lines to detect things on the told place, in the case, it detects what appear on a capsule that you can make the target side radius bigger, and then the node Break Hit tells where detection is find. This can be done making a object colision component in front of the pawn that detects what enters inside the area. After getting the HIT event, it would perform a check to know what it hit. If it hit the Enemy Pawn class, like one I have on my project and all enemies are derived from, it returns the location, with this data, you may use nodes like Launch character, since you in air, to the position of the enemy, and having a boolean telling that when you in jump state, you attacking, and another node anywhere that detects that if you attack state and hit an enemy, use a damage node to be cast to the enemy.

    Well, in case you want, you can download the code of the project and see how many things are made, I will probably get into homming attack to be done until the end of this month. You can PM me or get my contact on my site if you want to talk more.

    https://github.com/HedgehogDevelopme...DevelopmentKit

    On how to apply the impulse to the character into the place, there are some ways like the launch character, there are more here: https://answers.unrealengine.com/que...h-bluepri.html
    My Portfolio/Resume: www.chaosforcestudio.wix.com/portolio
    One of my projects: www.chaosforcestudio.wix.com/sonicevolution

    Comment


      #3
      hey i know this is a dead thread but i was hoping to know if anyone was able to get this working i tried using the "multicapsule trace by channel" but no matter which way i do this its just not working out. i have successfully gotten the "launch character" node with a "get forward vector" to make the air dash. but i cant seem to get it to home in on objects, i am using the HDK if this makes any difference. ive made many changes and improvements, also had a few setbacks but im so close to the homing attack i can taste it but it still eludes me.

      Comment


        #4
        Hey Tsb721 are you still looking for an answer? If so, I can share the BP once I'm back on my dev PC.

        I was able to get something working using "box trace by objects" and the "launch character" function coming off of the "event tick." So every tick, it's launching Sonic towards the location of the homing target.

        Comment


          #5
          Adam Kareem Yes please id love to get that working. You can pm me ill give you my email

          Comment


            #6
            Sorry it's been so long Tsb721 ! I put a pause on developing for a while.

            Here's a snapshot of how I get the homing attack to work. This first one just shoots Sonic in a straight line, so not actively "homing" with each tick.

            The "Homing Target Location" variable is updated every tick. When you connect this to "Launch Character" the way it is in the first image, you'll get a Homing Attack.

            Comment

            Working...
            X