The genre of my game is hack and slash and I’m making a system to lure the enemy to me with “Cable”. I tried several ways but most of the time it didn’t work out the way I wanted (for example the Nero character in DmC5 or the cable thrown for movement in Naraka).
I would appreciate it if you could briefly explain the logic. Thank you.
Perhaps you could produce a visual reference to the cable luring mechanics. A YT link is worth descriptive 10 posts.
https://youtu.be/ysU-8kIHQFo?t=1046 like this.
So… we just pull them towards us? When you say Cable, are you referring to the UE’s cable component specifically? Because that’d be just a visual thing, the pulling is something that happens under the hood.
I don’t know if it will only work visually, but the idea I have in my mind is like this: a cable will be thrown and if it hits the enemy in the location where it is thrown, it will pull the enemy to my side. If there is a different method, I would appreciate it if you share it with me.
I mean, the visual aspect is up to you, the mechanics will (and probably should) be completely separate from the visual. It’s always smoke and mirrors if you want both - things to feel & look right.
Two methods come to mind when working with characters that could work well for this:
- Launch the hit character in your direction, more funky, less predictable, more physical
- create a spline and slide the target towards you over time - more rigid behaviour with plenty of control. This will also work well for any object you may want to pull.
There’s probably more methods / hybrids of the above.
You could also experiment with something much simpler by directly setting velocity of the target character movement component:
With some extra tweaks, this could work well enough. Again, depends on how feature-rich this needs to be and how it must perform.
I appreciate your example and your response. I will try as soon as possible. In this example a system is installed with mouse but, I will try it with sphere trace. Thanks for the idea.
Yes, as I said, I think I solve this with Sphere Trace. The first attempt gave results and it gave me an idea of what to do in logic. Thank you again.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.