# Sphere bounces on "triangle intersections"

Hello, this is my first time on the forums.

I’m using PhysX 3.3

Whenever I have a place in my game where there’s 2 triangle shapes that come in contact, and when the sphere rolls over it, it gets an “impulse” from rolling over it. They are at the exact same height, so there shouldn’t be an edge hit. It comes whenever there is are 2 edges that come in contact and the sphere rolls on that.

Any help would be appreciated, I need this to be fixed so that the sphere smoothly rolls over the two edges without any impulse.

Hi,

I’d just like to clarify the problem a little more before attempting an answer. Do you mean the internal boundary of two triangles within a PxTriangleMesh or at the junction of one PxTriangleMesh and another?

Thanks,

Gordon

Hi Gordon,

The junction of one PxTriangleMesh and another is what is causing undesirable physics results.

Thanks,

Jeff

Hi again,

Sorry for the delay in replying.

The trick here is to overlap the two meshes so that they end up with coincident internal vertices with the outer triangles playing no role in the simulation.

Devtalk removes all spaces from ascii art so it is hard to display that here. I’ll explain further in text. Imagine we are in 2d to make this simpler to understand. Now, imagine two adjacent meshes labelled A and B. We’re going to label the outer triangle on mesh A as zA and the outer triangle on mesh B as zB. The inner mesh triangles adjacent to zA and zB we shall label yA and yB. The vertex shared by yA and zA we shall label vA and the vertex shared by yB and zB we shall label vB. The first step is to line up the meshes so that vA and vB are coincident. Now pull the triangles zA and zB downwards. These triangles no longer play any role at all. A ball rolling across the two surfaces will experience first triangle yA then triangle yB because they join at vA/vB.

I hope this helps,

Gordon

Hi Gordon,

I’m having trouble visualizing this, would you mind a quick mockup diagram and maybe upload it to imgur or something? I would really appreciate it.

Thanks for your help so far!

Jeff

Hi,

I tried to visualize my explanation here

http://gyazo.com/e0a848dbcc3e5fa6d36c90a168a09c9c

Hope this helps,

Gordon