I have two cable components in my third person character and whenever I set their location to a spot on the character they stop showing up in the game. The only way to fix the issue while the game is running is to select my character in the “World Outliner” and change the visibility setting under “Rendering” each time, setting it as visible using event tick doesn’t even work.
I found the solution. I was messing with the cable settings and I found if you have the length set to about 1 or higher they don’t disappear. Now I just have to set up making them visible when I want them to be.
SolveDistanceConstraint in CableComponent.cpp has a divide by zero if the current distance between two particles in the cable is zero. There is no error or warning because the positions simply turn to NaN. You can see this with a call to GetCableParticleLocations. These NaNs can then only be removed by reinitializing the particle locations, which happens in UCableComponent::OnRegister.
Setting the desired cable length to a non-zero value makes it less likely for the cable to disappear, but it can still happen, especially if there’s no forces on the cable.