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

Author Topic: How to create a shape with its axis of rotation in the center?  (Read 1252 times)

0 Members and 1 Guest are viewing this topic.

idontmakesense

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • Email
I've created basic shapes like rectangles, triangles and lines but they all rotate from one end of the object. I want to uniformly rotate it from the center of the object. Intention is to create a car(top down) driving on the screen.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: How to create a shape with its axis of rotation in the center?
« Reply #1 on: July 19, 2013, 11:11:08 am »
Use the setOrigin function. Read the transformations tutorial carefully so that you fully understand what it implies.
Laurent Gomila - SFML developer

idontmakesense

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • Email
Re: How to create a shape with its axis of rotation in the center?
« Reply #2 on: July 19, 2013, 11:16:13 am »
Thanks. I did read it, ill try again. Maybe look for more examples.