Question about Rotation

Hey guys, i have a dobut, can you make an object rotate around another object? (set the anchor x and y on the other object x and y?

I’m making a guy hold a lantern (top view), i can make the guy rotate and move perfectly but if i rotate the lantern it will rotate on its own reference point (center of the .png), i know how to change the reference point on the object itself (setReferencePoint( display.TopLeftReferencePoint) for example) but im not sure if u can set it to another object x,y.

I could put some screenshots here for u to see what im trying to do if u dont understand it, but i cant post any code with my WIP since i have no idea how to make it rotate like that, however i will submit any piece of code u want of the working stuff.

 

Thanks in advance and excuse my english (spanish speaker here  :P)

 

Again, if u dont understand what im trying to do just ask me i will try to explain myself a bit better.

 

Edit: typo

Edit: apparently the setReferencePoint is deprecated and need to use the anchors, it wont fix the problem anyways :/, i cant put the guy and the lantern on the same .png since the lantern has alpha on it and the guy is solid.

This is a bot.   Ignore it.

There is some idiot out there running a bot that:

  • creates a new account
  • duplicates old post 
  • repeat.

This is the original post: https://forums.coronalabs.com/topic/44347-question-about-rotation 

How bizarre. We get a very short 70-80 years on this planet if we’re lucky and building pointless bots is how people choose to spend it?

This has been going on for a month or so now too.  Some jerkoff keeps making these msmile, maria smile, etc. accounts.

I wonder if we need to add a captcha or something like it to the account creation process…

Hey guys, sorry about this. I don’t remember that post from 2014. I guess I need to be more on the watch for msmile posts and stop approving them. There was nothing in that post other than the email address that gives me any justification to block the poster.

Rob

This is a bot.   Ignore it.

There is some idiot out there running a bot that:

  • creates a new account
  • duplicates old post 
  • repeat.

This is the original post: https://forums.coronalabs.com/topic/44347-question-about-rotation 

How bizarre. We get a very short 70-80 years on this planet if we’re lucky and building pointless bots is how people choose to spend it?

This has been going on for a month or so now too.  Some jerkoff keeps making these msmile, maria smile, etc. accounts.

I wonder if we need to add a captcha or something like it to the account creation process…

Hey guys, sorry about this. I don’t remember that post from 2014. I guess I need to be more on the watch for msmile posts and stop approving them. There was nothing in that post other than the email address that gives me any justification to block the poster.

Rob