Download

Node like connection system

Hello Unreal Community,

can you please point me in the right direction. I’m trying to make a game where the player connects lines, like one might do in the unreal blue print side of programming. These lines would allow characters to follow that path. The player would click on a start pin and then able to select another connecting the line. Before connecting to the second pin the line would follow the player’s mouse or thumb stick icon. I trying to go for a 2d look instead of tubes with the cable component.

In short how can I mimic the pin connection node system unreal 4 has? Can you put up pictures please.

Thanks in advance.

This is one of those questions where what you actually need to do is work through it yourself one step at a time. Spitball some ideas in here and we’ll help you with them.

The obvious first step is you could make each node a UObject that has a list of connected nodes. What kind of logic do you need to run on them? Can you create loops that you need to know about to prevent any iterative recursion?

Look up how Graphs work. For each node in the graph you would store th neighboring node.
The graphical representation can be omitted first. just do a graph in code and listen to user input to wander around in this graph

Hi Antidamage,

I’m not 100% sure on what your talking about. As of now I’m not worried about recursions? What is a UObject? I’m just trying to connect one point to another.

Now that I have this I’ll try and set up at the start of game attach cable to the mouse/thumb stick in 2d screen space.

Thank you again for your reply.