I’m working with a simulation that requires cable components to be dynamically created. One issue that I’m running into is that there does not seem to be a node that allows you to modify a cable component’s number of segments.
Ideally, I would like to modify the segment number based on the size of rope spawned (ex: # of segments is the length / 10). This only needs to occur during the initialization of a cable. Once the number of segments is set, that is the number until the cable is destroyed. Is this a missing feature, or am I going about this wrong?
I checked the cable component code, and found that NumSegments is set to ‘BlueprintReadOnly’ (as opposed to BlueprintReadWrite)
/** Rest length of the cable */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Cable", meta=(ClampMin = "0.0", UIMin = "0.0", UIMax = "1000.0"))
float CableLength;
/** How many segments the cable has */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Cable", meta=(ClampMin = "1", UIMin = "1", UIMax = "20"))
int32 NumSegments;
So at this point you may be able to create your own CPP cable component with that change. (I don’t THINK you’d need to compile a custom version of the engine to change this) And then again, maybe there is a good reason why NumSegments is ReadOnly.