How do I Allow user to rotate object around axis?

Get help using Construct 2

Post » Mon Apr 07, 2014 3:18 pm

I am making a game where the player will be able to move the hands of a clock around to a specific time. However I cannot figure out how to allow the player to rotate the hands of the clock around without moving the hands from the centre of the clock. Is there any way this can be done. If so can anybody help me please?
B
3
Posts: 8
Reputation: 191

Post » Mon Apr 07, 2014 4:07 pm

Objects rotate on their origin points , so make sure the hands on your clock have an origin point at its end , or close to it.
What I know would fill a Book , what I don't know would fill a Library
B
37
S
12
G
29
Posts: 331
Reputation: 16,499

Post » Mon Apr 07, 2014 4:18 pm

Thanks for that granpa. I am still completely in the dark about how to allow the player to move the hand around this origin point and choose what time the clock shows though. Would you have any idea how this could be achieved?
B
3
Posts: 8
Reputation: 191

Post » Mon Apr 07, 2014 6:55 pm

Set the origin point to the start of the hand(like in a real clock), add a touch object to your game (could be mouse, I like touch so it works on mobile too), if Touch> is in touch> set hand angle to > angle(hand.X, hand.Y, Touch.X, Touch.Y)

this should guide you in the right way.
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Mon Apr 07, 2014 8:52 pm

thank you caiorosisca, that is exactly what I was looking for
B
3
Posts: 8
Reputation: 191


Return to How do I....?

Who is online

Users browsing this forum: Microbex, PROxMTswatTR and 14 guests