Group Scaling --> Issue ??

Hi,

is this a bug, or am i doing something wrong…
I have a group and have inserted all my objects into it.

So i want to zoom out… and but it seams that my other bodies in the group also scale up… or i think they stay as they are… they do not scale down …

Do i need to scale also all the other bodies in the group down to the same value?

local physics = require("physics")  
physics.start()  
physics.setDrawMode( "hybrid" )   
local levelGroup = display.newGroup() --LEVEL GROUP --\> ZOOMING ETC..  
  
display.setStatusBar( display.HiddenStatusBar )  
local bkg = display.newImage( "bkg\_cor.png" )  
levelGroup:insert(bkg)  
  
local grass = display.newImage("grass.png")  
grass.x = 160; grass.y = 430  
levelGroup:insert(grass)  
physics.addBody( grass, "static", { friction=0.5, bounce=0.3 } )  
local grass2 = display.newImage("grass2.png") -- non-physical decorative overlay  
grass2.x = 160; grass2.y = 440  
levelGroup:insert(grass2)  
  
local j = display.newImage("crate.png");  
j.x = 60 + math.random( 160 )  
j.y = -100  
physics.addBody( j, { density=0.9, friction=0.3, bounce=0.3} )  
levelGroup:insert(j)  
  
local jj = display.newImage("crateB.png");  
jj.x = 60 + math.random( 160 )  
jj.y = -100  
physics.addBody( jj, { density=1.4, friction=0.3, bounce=0.2} )  
levelGroup:insert(jj)  
  
------------------------------------------------  
-- \*\*\* ZOOM LITTLE OUT \*\*\*\*  
--transition.to(levelGroup,{ xScale = 0.7, yScale = 0.7, y = 30, time=1000})  
------------------------------------------------  

IMG1 NORMAL: -->> http://screencast.com/t/gf7kPOjyLHa
IMG2 levelGroup Scaled to 0.7 -->> http://screencast.com/t/IApstNlIMbOW

Thx for your help.

  • Alen [import]uid: 9592 topic_id: 24269 reply_id: 324269[/import]

Hi Alen,

Don’t think scaling changes physics bodies. See Remarks on API for object:scale()

http://developer.anscamobile.com/reference/index/objectscale [import]uid: 39538 topic_id: 24269 reply_id: 98072[/import]

Hi Mark,

thx for your reply.

I know that the scaling does not change the physic body…
But i thought that something did change with the latest build…

I am a little bit confused…

The simulator shows the (in hybrid mode) big physic bodies, but the collision acts like they are scaled …

here is a Screenshot… do you know what i mean?
http://screencast.com/t/dmk8xngrHn [import]uid: 9592 topic_id: 24269 reply_id: 98082[/import]