Problem with the physic

Hi,

In my game, I have two simple objects: a ground and a ball:

g2

In this image you can see the ground behavior:

g1

And the ball physic:

g3

My expectation is the ball falls on the ground,
But the ball just blinks and disappears!!

Where is the problem?

The source file is here:

regards,

Saeed

It maybe too fast, also do you have the platforms with the platform behavior? It falling that fast and that would be the possibility

No, I don’t have any platformer behavior and the speed is the default speed!

Try to give the ball platformer behavior and the blocks as platform [the platforms don’t block the object from passing]

But even my game isn’t a platformer game!

I added the source file.

just give the platforms the platform behavior, its not really a platformer thing

But why shouldn’t it work in this mode when everything is correct?
Where is the physical problem?

Is there any bug?

thanks

I can’t download your file but it works fine for me!
No platform behavior required and not recommended to use it together with physics.

What works fine for you and why you can’t download the file?

When the ground shape is flat and the behavior shape is static it works well like:

Image shape: flat Behaviour shape: static

and when the ground shape is bumpy and the behavior shape is static It deals with the problem like:

You can test it.

Drop a dynamic circle onto a static object.

Access Permission…

How did you make it bumpy? Only on the graphic?

Now it is available for every one.
Can you please give it a try?

regards

Okay. The ball is pushed up on the ground object.
Because the engine doesn’t know that there is a background and ground with structure on your image.

Use invisible objects to model the terrain or create a physics hitbox with Polygon instead of Box Shape.

The problem is that the physics collision mask is NOT the same as the object collision mask, and the red parts don’t automatically become a collision mask; you have to define it.

The physics collision mask on this shape is enclosed by the blue box:

When you place the ball in it, it will be forced out of the blue box, and will be somewhere off the screen.

That is why is disappears. If you were to zoom out, or make everything smaller so it easily fitted on the screen, you would see what happens.

Can you please clearly tell me what shoul I do for the brown par?

At worst you will have to make up the shape from 6 separate rectangular sprites.

Alternatively you could make one square sprite (or maybe a tiled sprite) and create 6 instances it it, resizing each one, and fit them together to make the shape

Or you create a square sprite that is hidden and use that only for the collision mask. Place a number of instance of it over the brown parts of the image.

Sorry, there is no easy solution for this, because you cannot have collision mask that has an interior angle at a point that’s greater than 180 degrees.