# [Solved] Rotate object around a point

Get help using Construct 3!

### » Sun Jul 16, 2017 8:48 am

Hi,

I'm having trouble figuring out how to make this work in Construct3. Basically I want an object to rotate around a point using arrow keys (left to rotate clockwise and vice versa). Please refer to the image below.

The green triangle moves along the blue ring with the red dot being the center point.

I did come across some old construct2 samples but clueless as to how I should implement them in C3. (Center.X and Center.Y doesn't exist in C3 anymore?)

Any help is very much appreciated. Thanks!
Last edited by dylestorm on Sun Jul 16, 2017 11:43 am, edited 1 time in total.
B
31
S
12
G
6
Posts: 42
Reputation: 5,579

### » Sun Jul 16, 2017 10:29 am

dylestorm wrote:Hi,

I'm having trouble figuring out how to make this work in Construct3. Basically I want an object to rotate around a point using arrow keys (left to rotate clockwise and vice versa). Please refer to the image below.

The green triangle moves along the blue ring with the red dot being the center point.

I did come across some old construct2 samples but clueless as to how I should implement them in C3. (Center.X and Center.Y doesn't exist in C3 anymore?)

Any help is very much appreciated. Thanks!

You can make a clock look like this, let me give you an explanation on how to do this.

First you make the orbiting sprite twice or trice as tall but put the image at the bottom, and set the origin to top.
After that it should look a little like this.

Then you can just rotate it like normal and it should orbit while pointing at the center. The end.

And if you wanna make it to where you can switch it up with any sprite at any time, just erase the sprite's image and add an image point called Orbit or whatever, set it to bottom, then just constantly set a sprites position to the Sprite.ImagePointX("Orbit") Sprite.ImagePointY("Orbit"), and set its angle towards Sprite.ImagePointX("Origin"), Sprite.ImagePointY("Origin")

None of this will work with physics, this would be near impossible and insanely complex to do with physics on the orbiting object unless it is set to immovable.
B
27
S
12
G
5
Posts: 79
Reputation: 5,223

### » Sun Jul 16, 2017 11:05 am

@MorrisFeldman

Your images are not showing but I think I get the gist of it. I seriously never thought of using the method that you mentioned. This will make implementing the other ideas I have in mind much easier.

Thanks!
B
31
S
12
G
6
Posts: 42
Reputation: 5,579

### » Sun Jul 16, 2017 11:08 am

B
33
S
18
G
29
Posts: 2,493
Reputation: 21,450

### » Sun Jul 16, 2017 11:15 am

99Instances2Go wrote:https://www.dropbox.com/s/bcdjvcyyj8m9mki/Sin%26Cos.c3p?dl=0

Thanks a lot! Exactly what I was looking for
B
31
S
12
G
6
Posts: 42
Reputation: 5,579