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

381 generate collision contacts #520

Open
wants to merge 76 commits into
base: master
Choose a base branch
from

Conversation

dawidkomorowski
Copy link
Owner

No description provided.

Comment on lines +91 to +98
if (translation == Vector2.Zero)
{
mtv = new MinimumTranslationVector(Vector2.UnitX, penetrationDepth);
}
else
{
mtv = new MinimumTranslationVector(translation.Unit, penetrationDepth);
}

Check notice

Code scanning / CodeQL

Missed ternary opportunity Note

Both branches of this 'if' statement write to the same variable - consider using '?' to express intent better.
Comment on lines +57 to +64
if (mtv1.Length < mtv2.Length)
{
mtv = mtv1;
}
else
{
mtv = new MinimumTranslationVector(mtv2.Direction.Opposite, mtv2.Length);
}

Check notice

Code scanning / CodeQL

Missed ternary opportunity Note

Both branches of this 'if' statement write to the same variable - consider using '?' to express intent better.
@@ -80,7 +79,30 @@
CreateCamera();
CreatePoint(0, 0);

CreateKinematicBody(0, 0);
var entityController = CreateEntityController();

Check warning

Code scanning / CodeQL

Useless assignment to local variable Warning

This assignment to
entityController
is useless, since its value is never read.
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

Successfully merging this pull request may close these issues.

Generate collision contacts
1 participant