# How to avoid node spiralling out when rotating node around point in a circle via translate()/move()

When I rotate an object around a point via translate() using

`get_node("INSERT_NODE_HERE").translate(Vector2(-1,0).rotated(get_node("INSERT_NODE_HERE").get_global_pos().angle_to_point("INSERT_POINT_HERE"))*speed*delta)`

the node rotates around the point in a circle, but it also begins to spiral out from the center, is there any way to fix this?

Here is a gif of my problem

imgur.com/zKoq232

EDIT: This also happens with move() with KinematicBody2D

## Answers

22MemberJust a guess but is

translate(Vector2(-1,0)being applied every frame, causing the location to spiral out?36Memberyes, it's in _fixed_process(delta), is there some reason that this causes the problem?

will test with KinematicBody2D to see if it also happens with that...

36Membercan confirm KinematicBody2D has this problem with move()

(will add to OP)

1MemberWell, looking at your code, I suppose you are rotating a object by moving it, every frame, a little amount in a direction perpendicular to the line connecting that object to a point. This won't result in a perfect circular movement because, according to the pythagorean theorem, the new distance to the point will be slightly bigger than the previous one:

[(new distance)²=(old distance)² + (dX)²]

I think way to fix that is just making the object follow circular path centered on the point

36MemberYeah, I'd say that would probably be the best hassle free way to do this, thanks!