Hi, i am trying to recreate a pendulum simulation.
In this simulation, i should be able to use the mouse to move the pendulum around.
Additionally, the user can change the pendulum’s weight, the rope’s height, the gravity and the friction.
I haven’t used gdevelop 5 in quite a long time so i have forgotten most of the app’s function.
It would be great if you could point out which function i could use to achieve my goals.
Many thanks
Sounds like you could use physics and physics joints like rope and a mouse joint to move it or maybe force.
https://wiki.gdevelop.io/gdevelop5/behaviors/physics2/#controlling-object-movement-with-joints
HI, thank you for your suggestion! I have almost complete the simulation, only a few details left.
I have use draggable physic to move the pendulum around and rope joint to hang it up. Do you know how I can show what’s the angle of the pendulum when I move it up ?
Hi Vinh, great to hear your simulation is almost done! To show the pendulum’s angle, you can use angle expressions in GDevelop. You can display the angle value with a text object and adjust it to show the angle in 0-360 degrees. Rounding the value might make it easier to read. Hope this helps
