Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

output as tangentImpulse when it's drawFrictionImpulses. #886

Open
ikpil opened this issue Feb 15, 2025 · 0 comments
Open

output as tangentImpulse when it's drawFrictionImpulses. #886

ikpil opened this issue Feb 15, 2025 · 0 comments

Comments

@ikpil
Copy link

ikpil commented Feb 15, 2025

if ( draw->drawFrictionImpulses )
{
    b2Vec2 tangent = b2RightPerp( normal );
    b2Vec2 p1 = point->point;
    b2Vec2 p2 = b2MulAdd( p1, k_impulseScale * point->tangentImpulse, tangent );
    draw->DrawSegment( p1, p2, frictionColor, draw->context );
    snprintf( buffer, B2_ARRAY_COUNT( buffer ), "%.2f", point->normalImpulse ); // <---- point->tangentImpulse
    draw->DrawString( p1, buffer, b2_colorWhite, draw->context );
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant