Swinging hard objects in the wind using system wind

I want to create a pendant lamp, but I don’t know how to create the physics of the lamp swinging on a chain from the wind. Any ideas? Thank you.

Hey Ilas, welcome back to the forums!

So am I correct in thinking you don’t want to animate it, but have it move based on a scalar parameter you can set in the level? You’d have to obviously pass that into the BP for sure, make sure your level streaming is set up appropriately so it doesn’t Accessed None on you!

But I’m thinking:
A static mesh for the lamp, a static mesh for the base, and a spline with a mesh applied to it for the chain.

It’s likely the lamp and chain would have to be dynamic, not static or moveable (possibly the entire BP’s list of meshes).

High mass on the lamp static mesh, but low enough to let the wind apply. You’ll have to tune that, I’m sure.

Possibly a springarm preventing the static mesh from overextending, but allowing it to move upwards towards the base should it get hit by another object.

Hope that can get you started!

1 Like

Hi!
Here is my model. I made the rope using “+Add component → Cable”. I already have a grass material that allows it to sway in the wind. The problem is that I don’t know how to get my wind system to interact with the lamp. Yes, I want the lamp to swing on Cable. Can you suggest next steps?

Nice work! Unfortunately that material work isn’t going to be appliable to the lamp.

You could try to create an actor that would just hold variables in the scene, and on the lamp use “apply Impulse” on a loop and pass in that “wind” as a Float and vector!

2 Likes