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?