"constraint inconsistent after World Space constructor"

"constraint inconsistent after World Space constructor"

Imagen de Bobby M.

I am loading a rotation matrix and translation data from file to position and orient a hinge constraint. The data looks fine, but a breakpoint is trigged by Havok:

This is the code at the breakpoint:

hkpLimitedHingeConstraintData *cnt = new hkpLimitedHingeConstraintData;
cnt->setSolvingMethod( hkpConstraintAtom::METHOD_STABILIZED );
cnt->setMinAngularLimit( min_angular_limit );
cnt->setMaxAngularLimit( max_angular_limit );
cnt->setMaxFrictionTorque( friction );
 cnt->setInWorldSpace( body_transform, IDMatrix, pivot_position, axis_vector );  <---- BREAKPOINT HERE

This is the breakpoint message: Constraint\Bilateral\LimitedHinge\hkpLimitedHingeConstraintData.cpp(87): [0x3A0A5294] Assert: Members of LimitedHinge constraint inconsistent after World Space constructor..

These are the values of the data passed to setInWorldSpace:

body_transform:
   rotation: 0.99997663,0,0 - 0,0.99997663,0 - 0,0,0.99997663 (X,Y,Z)
   translation: -288.00000,559.99890,863.94623,0.99997455 (X,Y,Z,W)

IDMatrix:
   rotation: 1,0,0 - 0,1,0 - 0,0,1 (X,Y,Z)
   translation: 0,0,0,1 (X,Y,Z,W)

pivot_position: -288.00000,512.00000,890.14362,0.99997455 (X,Y,Z,W)
axis_vector: 0,0.99997663,0,0 (X,Y,Z,W)

min_angular_limit: -1.5393804
max_angular_limit: 1.5393804
friction: 0.0

Any help would be greatly appreciated. If any more information is needed, please let me know and I'll post it.

Thank you

 

 

 

 

 

 

publicaciones de 3 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.
Imagen de Bobby M.

I believe I may have figured out what the problem was. After normalizing the rotational axes of "body_transform", it did not trigger a breakpoint. It seams like 0.99997663 would be close enough to unit-length, but I guess not?

Correct me if I'm wrong. It may just be that this fixed something else related to the matrix unit lengths.
Thank you again for any help.

Imagen de HavokTim

Hi Bobby M.--

The un-normalized rotation axis was probably at fault. The verification logic tests for orthonormal transforms with a tolerance of 0.00001, which would cause 0.99997 to fail. If the issue crops up again, please let me know.

Thanks,
--Tim

Inicie sesión para dejar un comentario.