Physics 2.0 Ball Hugging the wall after bounce

The wall object has a restitution of 1
I unchecked sleep
it does not become dead still it just starts going along the wall
So instead of bouncing away it starts moving parallel to the wall
I changed shapes to squares and it work a bit better

It sounds like there is a force or gravity being applied to it, but I can’t see the latter being the issue if you have set gravity scale to 0. Check your events to see if there are any other events where a force is applied.

Don’t use square collision for a ball - it’ll behave weirdly when it bounces off other physics objects.

I just searched for impulse and phsics 2.0 and I only use it to create a cannonball and then add an impulse right away. Is impulse the wrong way? As it applies only only once? Or is there a system wide gravity scale to consider?

edit: Adding a circle collider made the bullets slower…

edit2: I addded the bullet check

Do you do anything else with the cannonball in other events?

I test for collision and delete it after a certain amount of collisions with the wall. I also check for enemies.

I do both with the event … started colliding with … from the phsics 2.0 engine

One thing that might be wierd is that the static object has layer 1 and the cannon ball has the mask 1

Can you set the cannonballs mask and layer to 1, and the same for the static wall object? Is there a reason why you changed the cannonball layer to 2? The mask and layer are used to determine collisions.

And I guess one other question - do you have any other behaviours attached to the wall or cannonball objects?

I did not want cannon balls to collide with each other

No other behaviours are applied

I made a small test scene

I dont know how to share the project itself

I’m ruinning out of ideas on what is causing it. Do you mind sharing your .json file, and I’ll have a look into it? Even if you PM a link to it. I’ll have a quick look at it and see if I can spot what’s going on.

Sorry for being an absolute noob, but how do I upload or DM a json on this forum?

The best way is to put it onto a shared server (like DropBox, GoogleDrive, OneDrive etc) and post the link. You can only post or DM images in this forum.

I hope this works ^^

That worked. I’ve had a quick look, I’m at work at the moment, so I’ll have a closer look when I get home. Nothing obvious stands out.

I notice the cannonball does bounce off the wall along the top if the cannonball is fired to the left, but not if it’s fired to the right.

I think it’s a bug in the physics engine. I’ve recreated it in a simple project of just a ball and wall. I’ve started another thread to report it.

1 Like

Thank you! How long does it take for such a thing to usually be addressed?

That depends on when it gets picked up, the developer availability and complexity of the problem.

One thing I hadn’t looked at was if the velocity was an issue, and if faster moving objects means it will work. You could try this yourself - make all the sprites 2-4 times later, zoom the camera out proportionally and increase the forces applied to the cannonballs.

So making them fast increases the angle required to recreate the bug, but it needs a lot more speed to become better

Could you add that as a comment to the bug thread? It may help the devs narrow down the cause…

Does the cannonball make reducing bouncing movements, or does it become dead still once it’s hit the wall?.


Well it is like the part of the movement vector that is perpendicular is zeroed and all the force parallel to the wall is kept.