[SOLVED] Rotate one object around another by pressing a key

Get help using Construct 2

Post » Wed Jun 25, 2014 2:30 pm

Hi, I need to create similar functionality to this game: http://www.kanyezone.com/ where I can rotate an object around another by pressing a key. The issue of rotating one object around another has been solved on the forum before (viewtopic.php?t=63895&start=0) but I cannot find a solution to allowing user movement of the object like in the game I posted. My problem arises from what angle to use in order to to make it work.
Last edited by Kilbur on Wed Jun 25, 2014 3:06 pm, edited 1 time in total.
B
6
Posts: 15
Reputation: 287

Post » Wed Jun 25, 2014 3:03 pm

If you want a game in which the axis of rotation never changes, as in the example you sent, it might be easier if you just give the Origin Image Point an offset, like in this working example I made:

http://examples.gamesintheattic.com/rotation/

Use left and right arrows to move.

Not sure if this solves your problem, though...

The .capx is here:
http://examples.gamesintheattic.com/rotation.capx
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
21
S
6
G
3
Posts: 664
Reputation: 3,855

Post » Wed Jun 25, 2014 3:05 pm

brunopalermo wrote:If you want a game in which the axis of rotation never changes, as in the example you sent, it might be easier if you just give the Origin Image Point an offset, like in this working example I made:

http://examples.gamesintheattic.com/rotation/

Use left and right arrows to move.

Not sure if this solves your problem, though...

The .capx is here:
http://examples.gamesintheattic.com/rotation.capx


I always knew the solution would be simple, you're a genius sir thanks! :D
B
6
Posts: 15
Reputation: 287

Post » Wed Jun 25, 2014 3:47 pm

You're welcome. :)
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
21
S
6
G
3
Posts: 664
Reputation: 3,855

Post » Sun Jun 29, 2014 12:04 pm

By the way, I put together a tutorial teaching how to do this "the proper way"... :)

https://www.scirra.com/tutorials/1050/basics-of-circular-motion
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
21
S
6
G
3
Posts: 664
Reputation: 3,855

Post » Sun Jun 29, 2014 5:03 pm

brunopalermo wrote:By the way, I put together a tutorial teaching how to do this "the proper way"... :)

https://www.scirra.com/tutorials/1050/basics-of-circular-motion


Really nice, thanks!
B
6
Posts: 15
Reputation: 287


Return to How do I....?

Who is online

Users browsing this forum: YoHoho and 22 guests