Swaying random physic force

Hey guys, first post on the forums so apologies if I do something wrong :slight_smile:

To get to my question,

I’ve been working on some random levels and one level has some lights hanging from the ceiling, (suspended by like 3 meter long cables) and I’d love these lights to really gently sway, just enough for the player to notice it when watching them. (as if wind is blowing them around a bit)

I already made a simple cable with the lamp attached, and rigged it with some rigid-bodies so it sways when I manually push stuff into it etc. but I’d love a simple script that randomly adds a slight force to the lamp in random directions.

I’m currently a game artist student and basically know nothing about coding but I’m slowly learning bits and pieces because I know how damn useful it is. (the developers in my school are still learning too so I can’t ask them for help because they don’t know either :P)

Thanks in advance,

Ristridinius

Why not just make an animation of it swaying instead of using CPU power by having a rigidbody add force to the object? If you really want physics look at these…