Slow and smooth shake / floating effect on object

Hi everyone!
I tried to look, since this feel like a common thing, but I couldn’t find any help in 20 minutes. So here we are!

I’m looking for a way to make object float or slowly and smoothly shake on it’s place. You know, “randomly” moving a little, changing directions smoothly.

I was hoping to achieve this with the shake object-behavior, but it seems like I won’t be able to make it seem random and smooth… - unless I’m missing something.

I might manage to make it by myself using multiple events handling forces, but it would be nice to have a short-cut!


Smoothly and slow sounds like you are looking for tweens

There is gdevelop tutorial on gdevelop yt channel with them so you should watch it

Few tips i will give you that will help you avoid possible problems
Add new event

  • In condition add object boolean variable RM of YOUR OBJECT is True
  • Add tween to your object and ion same event add in action change its X position to RandomInRange(-20,20)
    Then below it add same tween but for tweening Y position and again use RandomInRange(-20,20)
  • Set this Tween to last 1 sec
  • Now you would need to add tween to change X and Y position to object original X and Y position
  • Add wait action to also last 2 sec
  • Add action to change boolean object variable OBJECTNAME.Variable(RM) set to False

Now whenever you want it to do that smooth movement you simply set that variable to true
If you want it to auto work constantly on its own
Then simply condition should be variable is False
And first action set variable to True
Then last action should remain set that variable to False

1 Like

Thanks a ton!
Oh wow these tween things actually seem very essential. How did I only now find out about these?

I’ll try using them later!

pff i know ppl that find about some essential features like hold l CTRL and drag object in editor to make duplicate AFTER 2 YEARS of using gdevelop

I bet i do not know about some features which are essential and i am here 1 year already