Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: How would you do pendulum movement?  (Read 1647 times)

0 Members and 1 Guest are viewing this topic.

baguettio

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Email
How would you do pendulum movement?
« on: March 23, 2020, 08:32:47 pm »
Trying to make the player swing on a pendulum with the mouse on a right-click being the pivot, so far managed to find the distance between the player and the mouse, the angle, and from that the pendulum period and frequency. How do I use these to calculate velocity?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10801
    • View Profile
    • development blog
    • Email
Re: How would you do pendulum movement?
« Reply #1 on: March 26, 2020, 08:46:59 am »
That's pretty much just a math/physics problem. Maybe you're lucky and someone has recently done something similar, but this is probably best ask somewhere else that focuses more on math in games. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

baguettio

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Email
Re: How would you do pendulum movement?
« Reply #2 on: April 21, 2020, 05:58:40 pm »
i asked on stack overflow and they told me to figure it out for myself ):

Hapax

  • Hero Member
  • *****
  • Posts: 3346
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: How would you do pendulum movement?
« Reply #3 on: April 21, 2020, 10:58:13 pm »
Ok. I'm willing to give you one pointer:
https://en.wikipedia.org/wiki/Pendulum_(mathematics)

 ;D
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*