Moving Camera

Got a bit of a situation,

I have taken the example of the joystick from here:
http://developer.coronalabs.com/code/simple-analog-stick-joystick-module

Initially placing it in the scene is fine but considering I am making a platform game where having a camera following the player will be pretty necessary, however following the player is easy but the joystick does not follow along and I am not sure as to how to do this.

placing the x and y initially is fine but like a widget I am unsure as to how to update the joysticks movement [import]uid: 87730 topic_id: 34206 reply_id: 334206[/import]

What approach are you using to move your “camera”? Since Corona doesn’t really feature a “camera viewport” and uses display groups instead, I would suggest you simply place the joystick in an overlaying display group which doesn’t move along with the others. Would this solve your issue or am I not fully understanding your request?

Thanks,
Brent Sorrentino
[import]uid: 200026 topic_id: 34206 reply_id: 136031[/import]

Thanks brent for the speedy reply I suspected this was going to be the approach I was needin to take. Put simply all I am currently doing is on create scene everything happens such as the creation of the display group the joysticks and everything are you trlling me if i was to create a display group called camera which happens after the creation of the first group I can move the x and y property of my newly created display group?

Long question short are lua files not limited to one display group per file [import]uid: 87730 topic_id: 34206 reply_id: 136112[/import]

What approach are you using to move your “camera”? Since Corona doesn’t really feature a “camera viewport” and uses display groups instead, I would suggest you simply place the joystick in an overlaying display group which doesn’t move along with the others. Would this solve your issue or am I not fully understanding your request?

Thanks,
Brent Sorrentino
[import]uid: 200026 topic_id: 34206 reply_id: 136031[/import]

Thanks brent for the speedy reply I suspected this was going to be the approach I was needin to take. Put simply all I am currently doing is on create scene everything happens such as the creation of the display group the joysticks and everything are you trlling me if i was to create a display group called camera which happens after the creation of the first group I can move the x and y property of my newly created display group?

Long question short are lua files not limited to one display group per file [import]uid: 87730 topic_id: 34206 reply_id: 136112[/import]

No. They are not. You can have as many display groups as you want. [import]uid: 147322 topic_id: 34206 reply_id: 136685[/import]

No. They are not. You can have as many display groups as you want. [import]uid: 147322 topic_id: 34206 reply_id: 136685[/import]