More accurate and reliable physics?

I wish I had more “solid” and reliable physics.

As you can see from my video, the ball inside the bowl comes out with sudden movements.
I’m from Unity which provides two very precise and realistic physics systems, Havok Physics and Unity Physics instead of the old PhysX.
Unity Physics was fixable by putting more precision into calculating physics.
In Unreal I still have to learn a lot.

How can I get a better result in Unreal 5?

Is there any trick to prevent objects from coming out of the vase?
I’m using a complex mesh for the vase.

Try selecting both the vase and the ball end enabling Constant Collision Detection (CCD). If that isn’t enough, enable Project Settings->Engine->Physics->Substepping.

Thanks for your answer.
But it still doesn’t work. Maybe I should enlarge the wall thickness of the pot.

Another thing I don’t get.

In the scene the colliders seem to be the one of the mesh and not the one set (simplified mesh, with fewer polygons).

In the inspection of the object the simplified mesh is set, but then when viewing the colliders in the scene, the original mesh of the vase is highlighted to me.

What collide is it using?

Does it use the mesh itself for the collision or the streamlined mesh I set up?

Thus it becomes pointless to create a simplified mesh if I then always use the object’s mesh to calculate collisions.

Isn’t there a video tutorial or part of the documentation that explains how to use a complex collision mesh? :open_mouth:

This seems incredible to me.

In UE5, the physics used is Chaos not PhysX.
By the way, if I were you I will try with turning on CCD first (continous collision detection). It is good for fast moving object that may miss the collision in fast movement.

1 Like

CCD is activated on both objects (and in Project settings).

I notice that you have “complex collision as simple” enabled. You should ensure that both meshes are set to “simple collision as complex”, as this will use your custom collision mesh and work better with rigidbodies.

1 Like

I really want to use complex colliders. So I could increase the thickness of the vase collider.
Anyway, let’s say I fixed it.
I make the objects move slower, as well as put a size limit (larger sphere = larger collider= better avoid interpenetration).

But all this is not the best solution. Incredible that meshes cannot be used as complex colliders, what do they exist to do?

The purpose of complex collision is to be used on large unmovable meshes that require precise detail, such as a mountain. To my knowledge, they cannot be used efficiently on a simulated actor. If you need greater precision on your rigidbody colliders, then try using Auto Convex Collision with increased settings. However, in my opinion, the physics in your game are already satisfactory.

This topic has been moved from International to World Creation.

When posting, please review the categories to ensure your topic is posted in the most relevant space.

Hopefully, this category change will help in finding an answer. In the meantime, good luck and happy developing! :slight_smile:

The concept is flawed in principle.

You cannot expect a simulation not to fail when the size of the collision is any less thick than the beed itself at 0 speed.
If you shake and increase the beed’s speed, all you will do is get it to fail faster.

To potentially get it to work, you’d have to figure out the exact max speed of the beed, the collision size of it, the purpose of which is to work out a size (a maximum value) for each frame.

You then either have to enable substep to cut the frames down to a value that is always less thick than the container by at least half, or Enlarge the beed so that the size of it won’t travel distances superior to that of its own radius each frame.

Because you are exciting the beed as it simulates, you can’t really know how much speed you are imparting in the first place - though you could figure it out by printing its values.

Still, its a core concept you better understand if you want to use any type of simulated physics.

Everything is frame rate dependent. More frames = more precision.

Collisions with thin objects can happen if the speed of the objects doesn’t preclude the penetrated item from being detected between frames.

1 Like

Another thing you could do is sweep a shape cast (or a line trace, if you don’t need too much precision) every frame from the balls previous position to its new position. If you encounter an obstacle (which is the wall of the jar in this case) in the sweep trace, simply set the object’s location back to its previous position before it passed through the wall. Then, to simulate a collision reflection, rotate the physics velocity of the ball by 180 deg about the hit normal against the wall. This can be done using the node “rotate vector around axis”. And then, negate the physics velocity vector to actually get it going back inside the container and obviously set it.