Swaying rope / wire to simulate breeze?

Does anyone know It it’s possible to make slightly swaying ropes / wires to simulate a breeze rather than having wires just static. I can’t find any posts about this concept and wondering if its possible to do efficiently.

My use case is for power lines; I’m currently using a curve plugin and I’ve tried using attachments to get it swing but its very buggy and didn’t have the same look that a normal power line would have.

6 Likes

I feel like a good place to put this would be in #development-support:scripting-support because of the scripts involved. You could probably add physics to the wire but that wouldn’t really make it sway.

2 Likes

will do, and yeah it was also bugging out when I tried

2 Likes

Best way I can think of is having the power lines curve downwards more (as if they’re a little loose) and then making them rotate slightly on the axis between both power poles. It’d have to be miniscule movement though. And probably wouldn’t look natural.

Another idea is to have many little parts that are attached to each other, and the two ends of the “rope” are attached to the poles. This would simulate a rope (but wouldn’t look as nice) and then you’d just need to apply forces to every part in the rope depending on how close they are to an end and also in what direction you want it to go (either rock back and forth or just one side and back to resting).

1 Like

hmm I don’t think it would be efficient though to have thought a game based on a city; someone did mention beams to me in dms but im now sure how I’d apply that.

Beams are probably your best bet. I’m not sure if they cancollide. But they’ll most likely give you the nature you want.
Here’s the API

2 Likes

Try having a rope have a split in the middle like this:

Then, try to make the split as seamless as possible, and try applying forces randomly to the middle part, as well as randomly changing the length.

Here’s a miserably made visualization of that:

https://gyazo.com/7efe14586d2e96debaba193e85cb53c0

2 Likes

oof that’s pretty smart, altho are u aware if it’s possible to get rid of that hump in the split so the rope looks smooth?

if you’re smart with your rope length, yes. you can also try splitting the rope into many parts. even applying a constant force to the part and changing the lenght itself should give you a good effect.

1 Like

https://gyazo.com/3d4beafcaa0b6ed9d91d97aa48412303

Just use a center attachment to join the two ropes.
image

No scripts needed; however, if your players start to lag i’d just log all the center parts and make them anchored and un-anchored by distance locally.

Or as you said by wind disable them when it’s not windy and enable them when it is.

But i’d try beams first to see how that goes.

2 Likes

Quick suggestion: use the ropes and part for the physics side of things, but for the visual side of things use two beams which can help smooth out that centre point on the rope. Add a script to the part to apply some gentle forces maybe, and it should be good?

edit: specifically with the beams, you can make them smooth by making the two control points around the part be equidistant and in line with the part and each other:

image

4 Likes

so the rope would do the physics and the beam would be the visuals?

1 Like

yup - the basic idea is that you keep some level of realistic motion while also keeping a bit of artistic control too :sparkles:

1 Like

ill try it out soon tyyyy! :cowboy_hat_face: