Ask here your questions to get help using GDevelop.
By pedroh2
#45571 I am doing a game and thought into creating a saw that hangs on a rope, swinging like a pendulum.Could someone help me? Ps: sorry for my English, and I don't speak very well yet ...
By L39
#45656 May be this helps:
Set Center of rotating in top center of object(Rope),
we need variable, which indicates the direction of movement («1» - clockwise, «-1» (or "0") - counterclockwise).
At beginning scene our pendulum moves clockwise;
Each Moment of execution, we check direction — CW or CCW;
if Pendulum rotates clockwise — the rotation Speed is positive, otherwise - negative.
then check the Position, and if the Pendulum is at an extreme Point - change Direction.
In File №2 added the object to a rope and fixed rotation.
P.S. This Example without any physics...
(13.85 KiB) Downloaded 137 times