Cable Sway

Hi All, I would like to cycle through multiple cable components and set their Y-force to simulate swaying in the wind. Can anyone think of a good way to do this? Right now I have it set up in the Level Blueprint so that for each cable component I have a sine wave randomizing the Y axis, but I can’t get from the for each loop to the Set Force of cable component.

if you have a better way of doing this please let me know. Bonus points if it can sway without having to be in Play mode so that the cables sway when using cinematics.

Well, if you are just looking for a visual effect and don’t have your heart absolutely set on using actual cable components, you could just make a regular mesh and use World Position Offset in its material (I believe the material editor even already comes with a simple wind function). That technique should also work regardless of if you are in-game or not. :slight_smile:

If you only want one end to sway and the other too look like it is firmly attached to something, you can use vertex painting as well.

I did try out the material World Pos offest but it never looked correct. If I can just bridge between the array and the “Set Force” in the Level Blueprint I think that should work.

Well, I’m not sure why it won’t let you just set force off of the for each node output. However, if you do manage to do it in blueprint, I do know that “simulate” in the play editor can be used to activate blueprints with cinematics, so at least there is that. :slight_smile:

Also, when creating a movie out of it, I believe the engine will automatically simulate for you, so you don’t even have to have simulate on in that case.

Thanks man. I actually found a material someone had made that simulates a cloth piping being pulled by gravity and wind. That, coupled with the already bounciness of the cable component actually got me to where I needed. ([FREEBIE] Material with animated wind and fake gravity UE4 tutorial - YouTube) if you want the material. Also, when I made my cinematic I didn’t even end up using a shot with the cables, haha.

If you want to see the cinematic: https://www.theonlyjakebaker.com/environments?pgid=kfhha7m4-e8780958-80ec-4086-88f1-06e32adec7f9