How to point to other components like the physics constraint does?

I’m trying to make a custom component (Rope), get the location of two other components in the same blueprint, probably static meshes, check their distance to each other, and apply force on both towards the other if they get too far apart.

This would make them act as though they were tied together and i can vary the force and distance to simulate bungie cords, chains, etc., holding them together.

I want to be able to drop the component in and put the names of the target components in it like the Physics Constraint does or the Cable component but i’m having trouble referencing the targets.

I put two variables, (PointOne, PointTwo), in the custom component and set them to Component Reference so it lets me put the name of the component in the details panel but everything seems to want a Scene Component Object Reference instead, which just gives me an empty drop down option in the details panel, same for a Static Mesh Component.

I started learning unreal a couple weeks ago, please help.

Is this an uncommon thing to do or is there some other method i’m supposed to use?

I figured out a way to do it.

I use an array to compare the written name to the primitive components and assign to a scene component variable whichever one matches.

this only works for the ones with the right name format but that should be fine since i’ll just use a sphere collider childed to what I want to attach and where I want it to apply force.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.