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?

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.

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.

[USER=“1188898”]Adam Kareem[/USER] Yes please id love to get that working. You can pm me ill give you my email

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.