Move object around a point

Conceptually, what I would like to do is simple. I have character that can move along a grid. At specific point in the grid at the characters discretion they can tab the screen and the move to a different row or column. I am having the hardest time making this movement look circular. Ideally if they held their finger they would move in a continuous circle. I have tried moving on enterframe and through multiple transition.to statement. I feel like I am missing something very obvious.

Does anyone have any guidance?

Thanks in advance
Aug [import]uid: 10374 topic_id: 2974 reply_id: 302974[/import]

>>I am having the hardest time making this movement look circular

Mmmh, I have a problem to envision what you want to do. Your character moves on y grid (maybe square ones). The you click somewhere on the screen. That defines a new location your charcter should go too? And what should be circular? The change of direction? Do you mean that when the character changes direction, it first turns around to a certain angle and then move further on that grid line?

Michael [import]uid: 5712 topic_id: 2974 reply_id: 8559[/import]

Let me try and describe a little better.

MikeHart you are very close. Basically when you tap on a side of the screen it indicates a turn. So like in a car if you held a steering wheel turned in one direction you would spin in a circle.

Aug [import]uid: 10374 topic_id: 2974 reply_id: 8594[/import]

I would use transition.to with the destination angle as the goal. [import]uid: 5712 topic_id: 2974 reply_id: 8597[/import]

When I do that, the movement looks more like a diamond then a circle.
Basically what I am doing
On left tap:
transition.to( player, { time=300, alpha=0, x=player.x+…, y=player.y+… } )
On complete
if tap not released
transition.to( player, { time=300, alpha=0, x=player.x+…, y=player.y+… } )

This worked to do what I need but the movement looked more like a diamond then a circle. [import]uid: 10374 topic_id: 2974 reply_id: 8599[/import]

So you want the character to turn like a car. Not like finish turn, then move forward into the new direction? [import]uid: 5712 topic_id: 2974 reply_id: 8603[/import]

I would like the user to be able to have the player move in a circle if they chose to do it. Right now they can get back to where they were but the motion looks like a diamond. [import]uid: 10374 topic_id: 2974 reply_id: 8610[/import]

Also, I really appreciate the effort to help me. Whether or not it gets worked out its appreciated. [import]uid: 10374 topic_id: 2974 reply_id: 8615[/import]

Just an idea:

1)Remove any assignments to object.x/y and instead work with a delta (see transition docs) for x,y

2)For rotation make a “filter” which will blend the current direction and the tap direction. At the start of the transition the filter has 100% current direction, whereas at the finish it has 100% tap direction.

[import]uid: 7356 topic_id: 2974 reply_id: 8623[/import]

Ok, still not sure what exactly you try to get with your character relating the touch coordinates. I THINK it is that you want the character to turn around that touch point in a circle. If the touch is more far away, the circle will be bigger.

Well, you basically need to caluclate a circle of points around that center point. Depending on how many you calculate, the more smooth your circle looks like. These points will be your waypoints for the series of transition.to statements.

[import]uid: 5712 topic_id: 2974 reply_id: 8828[/import]