# How do I update position to account for rotation of platform

Get help using Construct 2

### » Thu Aug 20, 2015 7:23 pm

I got a circular disk and It rotates

object.angle += 10 every second

so the objects that go on it I just set its angle to the thing its rotating buut the position doesnt stay relevant to the part of the sprite it is overlapping that is rotating

what is the mathematical equation for keeping position relative to the surface area of a sprite that is rotating? or how can this be done in construct 2??
B
2
Posts: 8
Reputation: 168

### » Thu Aug 20, 2015 7:56 pm

So is this like a ferris wheel, where the objects are on the edge of a circle ?

If so, you might want to consider moving from x,y coordinates to polar ones - angle from origin and distance - put these in your objects (family ?) and update the position using basic trigonometry.

I'm not clear exactly what you want to do.
My tutorial through development blog is at http://myconstruct2dev.blogspot.co.uk/
B
12
S
3
Posts: 221
Reputation: 1,328

### » Thu Aug 20, 2015 8:22 pm

paulscottrobson wrote:So is this like a ferris wheel, where the objects are on the edge of a circle ?

If so, you might want to consider moving from x,y coordinates to polar ones - angle from origin and distance - put these in your objects (family ?) and update the position using basic trigonometry.

I'm not clear exactly what you want to do.

yes ferris wheel effect where the point of entry is the same location but of course keeping track of this is confusing for me in construct 2.

So I should use trigonometry to decide based on the overlapped wheel objects angle my position is updated while overlap to include my new spot based on my old X and Y? hmmm im not the best on trigonometry but i think i see what is needed now center of image ... arctan? hmmm
atleast i know what is needed now thanks
B
2
Posts: 8
Reputation: 168

### » Thu Aug 20, 2015 8:59 pm

Forget about thinking where the things are in terms of x and y coordinates, and think in polar coordinates, do the movement in polar coordinates - in this case, rotating the object around the circle is easy, just change the angle - this is different to the rotation angle obviously.
My tutorial through development blog is at http://myconstruct2dev.blogspot.co.uk/
B
12
S
3
Posts: 221
Reputation: 1,328

### » Fri Aug 21, 2015 6:34 pm

Hmm, so rotate object with gravity?
B
2
Posts: 8
Reputation: 168