[RESOLVED] possibily bug(physics) with build 2189

Hello,

I just noticed that

physics.setDrawMode()

doesn’t work very well in build 2189

Just open \Sample Code\Physics\SimplePool\main.lua

add

physics.setDrawMode(“debug”)

And things went wrong completely.

This sample has its own flaws and warnings already,

but just set DrawMode to debug should not mess up like that?

Hi alex608,

It seems to be working fine in my tests. What issue are you seeing?

Brent

Hello,

  1. physics.setDrawMode(“noraml”)

The sample runs just like previous build.

  1. physics.setDrawMode(“hybrid”)

The sample runs good except there is an invisible object which has physical body all the time.

  1. physics.setDrawMode(“debug”)

The title screen is blank, all black, all I can see the the invisible object’s center point.

I copy the sample code for this test.

I didn’t edit anything else.

Hello,

This is expected. The “SimplePool” game begins with a title screen with no meaningful physics objects, so if you turn on “debug” mode, you won’t see anything. Typically, “debug” is not as useful as “hybrid”.

Brent

Hello,

Then I suggest that you should remove all meaningless physics objects.

After all, it’s a sample code.

Hi @alex608,

This is not a bug… it’s how “debug” mode works. When you use that mode, all visible objects are completely hidden, and you’ll only see the tracing of those objects with physics bodies if they exist on screen at the time.

In the SimplePool game, these objects actually still exist on the screen, and you can interact with them (tap, whatever) if you know where they are.

Brent

Thanks,

I already knew that, but I mean why do we need those no meaningful physics objects?

I actually mis-stated this… that demo doesn’t have any meaningless physics objects. When you turn on debug mode, the physics “world” has at least one indication that it’s running, like a little L shape in one corner. This isn’t part of a specific physics body.

Brent

Got it!

Thank you Brent. :smiley:

Hi alex608,

It seems to be working fine in my tests. What issue are you seeing?

Brent

Hello,

  1. physics.setDrawMode(“noraml”)

The sample runs just like previous build.

  1. physics.setDrawMode(“hybrid”)

The sample runs good except there is an invisible object which has physical body all the time.

  1. physics.setDrawMode(“debug”)

The title screen is blank, all black, all I can see the the invisible object’s center point.

I copy the sample code for this test.

I didn’t edit anything else.

Hello,

This is expected. The “SimplePool” game begins with a title screen with no meaningful physics objects, so if you turn on “debug” mode, you won’t see anything. Typically, “debug” is not as useful as “hybrid”.

Brent

Hello,

Then I suggest that you should remove all meaningless physics objects.

After all, it’s a sample code.

Hi @alex608,

This is not a bug… it’s how “debug” mode works. When you use that mode, all visible objects are completely hidden, and you’ll only see the tracing of those objects with physics bodies if they exist on screen at the time.

In the SimplePool game, these objects actually still exist on the screen, and you can interact with them (tap, whatever) if you know where they are.

Brent

Thanks,

I already knew that, but I mean why do we need those no meaningful physics objects?

I actually mis-stated this… that demo doesn’t have any meaningless physics objects. When you turn on debug mode, the physics “world” has at least one indication that it’s running, like a little L shape in one corner. This isn’t part of a specific physics body.

Brent

Got it!

Thank you Brent. :smiley: