Using physics in dusk?

I have set up some physics in dusk but encountered a few problems.

What is the “normal” way to set up physics for the following:

I have a map with different layers (tiles and object layers) and a character (group with different sprites and images) I put into one of the map layers.

Now I need physics working in the map, so the playergroup can collide with a ground objects and objects I place in an object layer.

Somehow the gravity value I have set is not working on the physical objects I place in the object layer… they are not falling down (out of the screen).

How can I let the player group “collide” with physical objects?

Thx for all your help!

I had one object outside the group which was causing physics problems. Now I’m using a little hack to position an object inside the group to a helper object in the groups with physics to get the right results. It is working… but not the “clean” way.

It sounds like you’re wanting the physics objects to fall out of the screen, but they’re not. Is that correct?

If so, try setting the physics draw mode to debug or hybrid and make sure the objects even have physics bodies. And don’t forget the correct Dusk way to add physics:

physics:enabled : true physics:bounce : 0.123456 physics:friction : 1.23456 etc.
  • Caleb

Thx for the info Caleb!

I had one object outside the group which was causing physics problems. Now I’m using a little hack to position an object inside the group to a helper object in the groups with physics to get the right results. It is working… but not the “clean” way.

It sounds like you’re wanting the physics objects to fall out of the screen, but they’re not. Is that correct?

If so, try setting the physics draw mode to debug or hybrid and make sure the objects even have physics bodies. And don’t forget the correct Dusk way to add physics:

physics:enabled : true physics:bounce : 0.123456 physics:friction : 1.23456 etc.
  • Caleb

Thx for the info Caleb!