Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
What's the best way to rotate several objects around the same point?
Print
Pages: [
1
]
Author
Topic: What's the best way to rotate several objects around the same point? (Read 1986 times)
0 Members and 1 Guest are viewing this topic.
normaldeveloper
Newbie
Posts: 3
What's the best way to rotate several objects around the same point?
«
on:
September 14, 2016, 04:48:45 pm »
I have two RectangleShape objects and I want to rotate them by some angle around the
same
point. What's the best way to do it?
Logged
fallahn
Hero Member
Posts: 507
Buns.
Re: What's the best way to rotate several objects around the same point?
«
Reply #1 on:
September 14, 2016, 04:55:20 pm »
Probably with a
transform hierachy
, where the point of rotation is the root/ parent transform of the two ResctangleShapes
Logged
Twitter
Super Video Golf
Tiled Map loader
Jonny
Full Member
Posts: 114
Re: What's the best way to rotate several objects around the same point?
«
Reply #2 on:
September 26, 2016, 04:19:27 pm »
Alternatively, set both their origins to the same point (as the origin doesn't necessarily have to be within the shape bounds) then rotate them as you would normally.
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
What's the best way to rotate several objects around the same point?
anything