Feed Me Oil style rotation

I love how they implemented it but can’t grasp how to do it with Corona.

Basically, you touch the object to give it focus and a circle appears around the object with rotational arrows. Touch inside this circle and rotate the object by rotating your finger. Touching the object still allows you to drag the object around.

i know we have some great coders out here. Anyone care to take a crack at this? [import]uid: 22392 topic_id: 12444 reply_id: 312444[/import]

I am certain I have seen a sample for this before; I’ll take a look for it tonight and post if I can find it - if not, will jot it down as a future tute :slight_smile: [import]uid: 52491 topic_id: 12444 reply_id: 45438[/import]

I would love to see what you come up with Peach. [import]uid: 14218 topic_id: 12444 reply_id: 45441[/import]

Have no fear, it took me half a day but I figured it out :slight_smile:

I have added the code to the code exchange

http://developer.anscamobile.com/code/rotate-object-finger [import]uid: 22392 topic_id: 12444 reply_id: 45500[/import]

@ noahm26
I was looking for a solution as this. The issue I notcie is that, the rotation is not smooth. Is there a way to avoid the snapping effect you get if you"

  1. rotate too fast
  2. drag diagonally across the object

How can you make it smoother… maybe a delay before it rotates (i.e.) easing or something.

Thanks for any help
[import]uid: 53149 topic_id: 12444 reply_id: 45571[/import]

@spenggong

It is pretty smooth if you ask me. I tested it on my iPad and have no issues.

Dragging across the object produces the flip in Feed Me Oils as well.
I don’t actually mind it… I’d rather have the instant turn than a gradual one for the game I’m working on.

If anyone has the time or ability to make it “ease” into the turn better, I’d love to see it… it’s a bit beyond my abilities at this point though. [import]uid: 22392 topic_id: 12444 reply_id: 45607[/import]