2D Circular Motion

Just a quick post today about implementing circular motion in a 2D environment.

  • Set centerX and centerY to the center of the circle (coordinates that you want your entity to move around)
  • Set the radius of the circle
  • Set the speed at which the entity should complete a full circle in seconds
  • Set the position of the entity to the results of the speedscale, x-translation, and y-translation

As time goes from 0 to 2*Pi and back to 0, the motion will complete a full circle.

One thought on “2D Circular Motion

Leave a Reply

Your email address will not be published. Required fields are marked *