Hello,
How do you scale all the objects in a scene by two fingers (multitouch) like in the game Angry Bird? I already read the example PinchZoomGesture but that is not involved in physics. I think of using a group to put all the objects in it and then use group.xScale and group.yScale to scale all objects down, the display objects are scaled down but the physics bodies are not scaled down. Any suggestion? I just wonder how did they do this in Angry Bird?
Label: corona android iphone ipad building error inmobi problem display screen View image tableView failed object physics touch button game lua config event listener |
how to scale down whole scene like Angry Bird?
Try using physics.setScale( number ). You'll have to play with the exact value to get it right for your game, so the "hybrid" or "debug" draw mode should come in useful for you as well:
physics.setDrawMode( "hybrid" ) physics.setDrawMode( "debug" )
According to the document, physics.setScale() "should be done only once, before any physical objects are instantiated". So after a multitouch, you can't set it again. In addition, changing this value has no visual consequences, and simply affects the accuracy of the physical model. So the objects' visual display will not scale down.
views:1434 update:2011/10/18 15:01:22
热门文章
GameCenter LeaderBoards and Achievements Enabled Through OpenFeint
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
相关文章
wheres my resources?
Flurry support in simulator
Implementing a scrolling background ...
Need help getting an Fxfield to follow a ship
Making a storyboard scene as a popup
my second Corona App - Plinko!
Collision Detection Issue
Push Support for Iphone application
Make An Object Jump Only Once
Forum path in the header
Flurry support in simulator
Implementing a scrolling background ...
Need help getting an Fxfield to follow a ship
Making a storyboard scene as a popup
my second Corona App - Plinko!
Collision Detection Issue
Push Support for Iphone application
Make An Object Jump Only Once
Forum path in the header
corona forums © 2003-2011