Phsycs Bodies 0v980 Sample Code

Hey guys

I just got a copy of this today and was checking out the physics samples… but seem to be experiencing some issues.

Im running latest daily build of Corona… 2013.2100…

See attached screenshot from sim. By physics bodies do not match the tiles. The behaviour of the collisions seems to be accurate though?

And the physics shapes are having a bit of a spasm. The Angled Physics sample is much worse… most of the shapes are shaking at rest and the slightest collision can make them go wild!

Any ideas? It all looked pretty stable in the demo videos for these samples

Cheers

R

Hello R,

What you’re seeing with the hybrid physics display is a known issue of the Corona SDK and entirely cosmetic. Basically, changing the scale of a display object does not update the hybrid physics display, however the physics bodies are in fact scaling correctly with the objects. This is why all the collisions are accurate.

As for the rather, shall we say, hyper behavior of the dynamic objects, this is all configurable by the user. I gave many of the objects high bounce and moderate to low density values to make the sample more dynamic and interesting. For example, when the project runs you’ll see a green ball jiggling around immediately to the right of the player rectangle. If you open the map in Tiled, right click on the green ball in the tileset view, and select properties, you’ll see all the physics properties I’ve set for the tile. If you change bounce from 0.9 to 0, the ball (and all others like it) will fall to the ground and remain still. On the other hand, setting bounce to 0.99 or 1 will make the ball bounce continuously to about the height it started. You can reconfigure the other objects as well to be more or less hyper.

I really should delve into the code/tool more before posting! But I am new to this workflow… ie. MTE/Tiled…

Thanks for the quick response. All makes parfect sense.

Cheers

Ok, I have played around with this… maybe you could help me with a couple of things

>  Could you tell me where the scale is being applied to the world? ie. twice the size of physics world?

> I have reset the properties on the objects to something more normal… density=1 and bouce= 0.5 for example… but it seems they never come to rest…  let me call it “a nervous twitch”.

I have made several physics games with Corona, and if I just allow several round balls fall to the ground they will come to rest and then sleep. Do I need to dig around in the physics defaults for MTE or something?

Cheers

Ok, I found the issue with “nervous twitch”… my bad… gravity was up at a mental 90! LOL

Just need to figure out where the scale is being applied to cause the mismatch with physics hybrid bodies… then I will RTFM!

Cheers

blockScale!

Cheers

You can never have too much gravity! Alright, I guess you can. I’ll be the first to admit that I don’t know all there is to know about Corona’s physics implementation! I’ll readjust the sample projects to something more reasonable.

Hello R,

What you’re seeing with the hybrid physics display is a known issue of the Corona SDK and entirely cosmetic. Basically, changing the scale of a display object does not update the hybrid physics display, however the physics bodies are in fact scaling correctly with the objects. This is why all the collisions are accurate.

As for the rather, shall we say, hyper behavior of the dynamic objects, this is all configurable by the user. I gave many of the objects high bounce and moderate to low density values to make the sample more dynamic and interesting. For example, when the project runs you’ll see a green ball jiggling around immediately to the right of the player rectangle. If you open the map in Tiled, right click on the green ball in the tileset view, and select properties, you’ll see all the physics properties I’ve set for the tile. If you change bounce from 0.9 to 0, the ball (and all others like it) will fall to the ground and remain still. On the other hand, setting bounce to 0.99 or 1 will make the ball bounce continuously to about the height it started. You can reconfigure the other objects as well to be more or less hyper.

I really should delve into the code/tool more before posting! But I am new to this workflow… ie. MTE/Tiled…

Thanks for the quick response. All makes parfect sense.

Cheers

Ok, I have played around with this… maybe you could help me with a couple of things

>  Could you tell me where the scale is being applied to the world? ie. twice the size of physics world?

> I have reset the properties on the objects to something more normal… density=1 and bouce= 0.5 for example… but it seems they never come to rest…  let me call it “a nervous twitch”.

I have made several physics games with Corona, and if I just allow several round balls fall to the ground they will come to rest and then sleep. Do I need to dig around in the physics defaults for MTE or something?

Cheers

Ok, I found the issue with “nervous twitch”… my bad… gravity was up at a mental 90! LOL

Just need to figure out where the scale is being applied to cause the mismatch with physics hybrid bodies… then I will RTFM!

Cheers

blockScale!

Cheers

You can never have too much gravity! Alright, I guess you can. I’ll be the first to admit that I don’t know all there is to know about Corona’s physics implementation! I’ll readjust the sample projects to something more reasonable.