Taking a look at the game Angry Birds, it seems that they can scale all the graphics while not affecting the physics engine. Can anyone show how to do this in Corona, please?
Thanks,
Matt. [import]uid: 8271 topic_id: 3275 reply_id: 303275[/import]
Taking a look at the game Angry Birds, it seems that they can scale all the graphics while not affecting the physics engine. Can anyone show how to do this in Corona, please?
Thanks,
Matt. [import]uid: 8271 topic_id: 3275 reply_id: 303275[/import]
Put all physics objects in group and scale group
The hybrid mode is buggy though and won’t redraw at the right scale. The physics does scale however. [import]uid: 5354 topic_id: 3275 reply_id: 9804[/import]
Cool, thanks. Of course, I have a ton of groups already, so I can just dump those into a ‘super group’ and scale that, right?
m [import]uid: 8271 topic_id: 3275 reply_id: 9821[/import]
Yup, should work
I always have a super group (world group) as this is one as to support landscape and portrait, rotation the world. [import]uid: 5354 topic_id: 3275 reply_id: 9822[/import]
Ah, right. That’s the only way a single display object can be considered as added to two groups, right? [import]uid: 8271 topic_id: 3275 reply_id: 9829[/import]
Yep, basically an object can exist in olny one group but the group can then be inserted into another group
Moving a parent effects all its children, groups, objects etc…
Objects also inherit the internal coordinates of a group.
At first it all seems quite complicated but once you get around the co-ordinates changing ( like scaling an outer group ) then its cool. [import]uid: 5354 topic_id: 3275 reply_id: 9830[/import]