Download

CCD not working correctly?

Hi,
Currently i have a collision Problem on my Pinball game.
This scene was recorded with no CCD. The ball is the default BallShape scaled 0.5
(at 0:50 the ball escapes on the left bottom corner)

I increased stepping sizes for colisisonchecks, same result. I reset this setting and enabled CCD for my Ball actor, same result. So i enabled CCD for all objects(even the static one). Same result.
I rescaled the level including my ball to 2x of the previous size(so the ball has now it’s default size of 1). Same result

The ball doesn’t seem to move too fast. But it still happens. And mostly on the bottom left/right corners.
I am using a material(for the ball and all objects) with a very low friction value. (0.001 IIRC)

Someone has a clue how i can stop this?
Otherwhise i’ll try to limit the ball velocity, if this is really the problem.

BTW: thos does not happen, when i unlock the fps so it runs at ~100FPS, but it does when i limit the editor to 60FPS.

EDIT: I changed the title, as it seems my problem is not 100% related to CCD

Greetings
Memnarch

I am still stuck at this problem.

I tested a bit more.
I tried to limit the velocity to 2000(Ball checks it’s velocity after AddForce and clamps the vector to 2000 on each axis, then sets physical linear velocity again)
Did not work.

This is the most common situation, where it escapes. though the ball is sometimes slow when it collides, it still goes through.
Same goes for the other side.

http://s1.directupload.net/images/140401/csukjrfa.png

Hi,

I would expect CCD to solve this issue, but one thing you could try is enabling sub-stepping. This feature is still a work in progress, but you can give it a try. Go to Edit->Project Settings->Physics
Look under the Frame Rate section and turn Substepping on. With this feature you can control the maximum delta time passed into the physics simulation. It will divide the frame if it needs to.
Note that this feature currently does not work on mobile.

Let me know if that makes a difference for you.

It seems that did the trick(just enabled substepping without modifying the values).
I removed my speedlimit and it went out only once, whent it got stuck between a bumper and another bumper and was pushed back and force. It then went through the invisible ceiling. I then reenabled my velocity limit(set to 2000) and now it went stable all the time. Though further testing is required. I’ll report here, if it still breaks.

One approach I was thinking about for cases like pinball and golf is a ‘hybrid’ approach, using a Projectile Movement Component for high speeds, where you want accurate, predictable elastic collisions, and the rigid body physics simulation at low speeds so you get the nice rolling behaviour. I have not had a chance to try this yet though.