SaeedP
June 4, 2023, 9:32pm
#1
Hi,
In my game, I have two simple objects: a ground and a ball:
In this image you can see the ground behavior:
And the ball physic:
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
SaeedP
June 4, 2023, 10:55pm
#3
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]
SaeedP
June 4, 2023, 11:00pm
#5
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
SaeedP
June 4, 2023, 11:15pm
#7
But why shouldn’t it work in this mode when everything is correct?
Where is the physical problem?
Is there any bug?
thanks
jack
June 4, 2023, 11:20pm
#8
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.
SaeedP
June 4, 2023, 11:57pm
#9
What works fine for you and why you can’t download the file?
SaeedP
June 5, 2023, 12:30am
#10
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.
jack
June 5, 2023, 12:32am
#11
Drop a dynamic circle onto a static object.
Access Permission…
How did you make it bumpy? Only on the graphic?
SaeedP
June 5, 2023, 12:52am
#12
Now it is available for every one.
Can you please give it a try?
regards
jack
June 5, 2023, 12:57am
#13
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 .
MrMen
June 5, 2023, 1:03am
#14
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.
SaeedP
June 5, 2023, 2:20am
#15
Can you please clearly tell me what shoul I do for the brown par?
MrMen
June 5, 2023, 2:47am
#16
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.