@@ -560,7 +560,7 @@ static float RayCastClosestCallback(in B2ShapeId shapeId, B2Vec2 point, B2Vec2 n
560560 {
561561 CastContext rayContext = ( CastContext ) context ;
562562
563- ShapeUserData userData = ( ShapeUserData ) b2Shape_GetUserData ( shapeId ) ;
563+ ShapeUserData userData = ( ShapeUserData ) b2Shape_GetUserData ( shapeId ) . GetRef ( ) ;
564564
565565 // Ignore a specific shape. Also ignore initial overlap.
566566 if ( ( userData != null && userData . ignore ) || fraction == 0.0f )
@@ -588,7 +588,7 @@ static float RayCastAnyCallback(in B2ShapeId shapeId, B2Vec2 point, B2Vec2 norma
588588 {
589589 CastContext rayContext = ( CastContext ) context ;
590590
591- ShapeUserData userData = ( ShapeUserData ) b2Shape_GetUserData ( shapeId ) ;
591+ ShapeUserData userData = ( ShapeUserData ) b2Shape_GetUserData ( shapeId ) . GetRef ( ) ;
592592
593593 // Ignore a specific shape. Also ignore initial overlap.
594594 if ( ( userData != null && userData . ignore ) || fraction == 0.0f )
@@ -618,7 +618,7 @@ static float RayCastMultipleCallback(in B2ShapeId shapeId, B2Vec2 point, B2Vec2
618618 {
619619 CastContext rayContext = ( CastContext ) context ;
620620
621- ShapeUserData userData = ( ShapeUserData ) b2Shape_GetUserData ( shapeId ) ;
621+ ShapeUserData userData = ( ShapeUserData ) b2Shape_GetUserData ( shapeId ) . GetRef ( ) ;
622622
623623 // Ignore a specific shape. Also ignore initial overlap.
624624 if ( ( userData != null && userData . ignore ) || fraction == 0.0f )
@@ -652,7 +652,7 @@ static float RayCastSortedCallback(in B2ShapeId shapeId, B2Vec2 point, B2Vec2 no
652652 {
653653 CastContext rayContext = ( CastContext ) context ;
654654
655- ShapeUserData userData = ( ShapeUserData ) b2Shape_GetUserData ( shapeId ) ;
655+ ShapeUserData userData = ( ShapeUserData ) b2Shape_GetUserData ( shapeId ) . GetRef ( ) ;
656656
657657 // Ignore a specific shape. Also ignore initial overlap.
658658 if ( ( userData != null && userData . ignore ) || fraction == 0.0f )
0 commit comments