hkpCharacterRigidBody gets stuck entering elevator (HKM movie)

hkpCharacterRigidBody gets stuck entering elevator (HKM movie)

SDK 650r1

http://ericundersander.com/enter_elevator2.hkm

hkpCharacterRigidBodyCinfo::m_maxSlope was set to 1.55 (nearly 90 degrees). Still, near the end of the video, we see a vertical collision plane at the character's feet as the character hits the lip of the elevator floor.

Any thoughts?

UPDATE 1:

I still have no solution, but I suspect the welding info is what's causing this bad surface normal. In this video, I was using mesh->computeWeldingInfo(tree_shape, WELDING_TYPE_ANTICLOCKWISE). WELDING_TYPE_CLOCKWISE produces roughly the same behavior.

Using WELDING_TYPE_TWO_SIDED (or simply not computing welding) makes the problem go away. However, I seem to need welding (one-sided) for my character movement in general, for exactly the case described in the Havok docs--avoiding bad surface normals when walking across perfectly smooth, triangulated floors.

UPDATE 2:

I was wondering why computeWeldingInfo chose a vertically-oriented normal for the geometry edge in question. That edge appears to be a vertical wall meeting a little horizontal lip, so I'd expect something like a 45-degree angle weld. However, I zoomed in on the triangles and noticed a dreaded T-junction at this lip. This might be tripping up the welding computation. I'll find an artist tomorrow and test that theory.

UPDATE 3:

Yep, fixing the T-junction fixed the welding and solved my original problem.

Going forward, our team will have to see if T-junctions are common and whether we want to try to fix them all. Our artists are aware that they're bad, but still... it would be *really* nice if computeWeldingInfo tolerated them. Otherwise, we may have to go to an alternate approach to character movement that doesn't rely on good welding info.

1 post / novo 0
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.