Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
General
»
How to create a shape with its axis of rotation in the center?
Print
Pages: [
1
]
Author
Topic: How to create a shape with its axis of rotation in the center? (Read 1249 times)
0 Members and 1 Guest are viewing this topic.
idontmakesense
Newbie
Posts: 13
How to create a shape with its axis of rotation in the center?
«
on:
July 19, 2013, 11:08:56 am »
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.
Logged
Laurent
Administrator
Hero Member
Posts: 32498
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.
Logged
Laurent Gomila - SFML developer
idontmakesense
Newbie
Posts: 13
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.
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
General
»
How to create a shape with its axis of rotation in the center?