Simple rotate system

Hi everyone :slight_smile:

i am creating some object and now i want to rotate this object 360º and drag the same object, like feed me oil objects, on my code i can drag a object very well, or can rotate 360º but not the same object, i want make like feed me oil, need some example about it: i will rotate a circle and this circle will rotate the object.
i really need some help to join this two parts

Thanks [import]uid: 26056 topic_id: 17478 reply_id: 317478[/import]

Hey Andre.

I’m not sure I fully understand what you mean.

Do you mean you want to rotate Object1 and have Object2 match its rotation?

If so it would simply be;

object2.rotation = Object1.rotation

Or do you mean you want to drag Object1 and have it rotate around as you drag it?

I can post some drag and drop code which rotates an object using buttons, (left and right) and rotates an object on the screen if that would help, but I’m not sure that’s what you’re asking for.

Let me know.

Thanks [import]uid: 67933 topic_id: 17478 reply_id: 66435[/import]

thanks for the help spider_newgent.

i need a simple example, some like this drag and rotate system of objects, see

http://www.youtube.com/watch?v=vPzJ1__LVaM [import]uid: 26056 topic_id: 17478 reply_id: 66442[/import]

Hmm, not sure off the top of my head, but will have a think and get back to you. [import]uid: 67933 topic_id: 17478 reply_id: 66460[/import]

ok spider, thank you very much for all the help, i only need a simple example, dont want a perfect system, need a example that is similar to the video that i show you but only a little example, i have a block and a circle around the block and if i click on block it will drag and if i rotate the circle, it will rotate the block, i have the drag system and 360º rotation system, only need some help to join this both things :slight_smile: [import]uid: 26056 topic_id: 17478 reply_id: 66560[/import]

Hey Barezi.

Sorry for the late reply.

Can you post what you’ve got so far? If you already have the object dragging, and already have it rotating, then it should be easier to link them using your code than write it all out from scratch.

As a matter of interest, I’m still a bit confused why it doesn’t work at the moment. You say you have it set up to drag when you touch the object, and rotate when you drag the circle?

If this is already working, what else do you need to acheive? [import]uid: 67933 topic_id: 17478 reply_id: 66657[/import]

no problem spyder :slight_smile:
i have a drag system and rotation system, but dont work together, i can drag a object if i click on this object and move it or i can rotate other object if e click on this object and rotate it with the finger, but i need to when i rotate the circle around the object it will rotate the object. i cant drag and rotate the same object only touching on this object, understand? :slight_smile: touching on object i only can drag and to rotate it i will need a circle around the object to make it. i had some ideias and will try it :slight_smile: [import]uid: 26056 topic_id: 17478 reply_id: 66677[/import]