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

Possible copy-paste error #5

Closed
Srekel opened this issue Jul 15, 2017 · 1 comment
Closed

Possible copy-paste error #5

Srekel opened this issue Jul 15, 2017 · 1 comment

Comments

@Srekel
Copy link

Srekel commented Jul 15, 2017

Hey,

Skimming through your code and found something that seemed a bit strange, though I don't understand the structure well enough yet to say its an error for sure. But in the loop around line 3778, I saw this:

		a -= colliders.boxes.count;
		b -= colliders.boxes.count;
		
		SphereCollider box = colliders.spheres.data[a];
		SphereCollider sphere = colliders.spheres.data[b];

I'd imagine it should be sphere in place of box in those lines?

@rasmusbarr
Copy link
Owner

Thanks! It's not a bug but certainly misleading to name the sphere "box" :) Fixed in bb00cb2

The lines a -= colliders.boxes.count; b -= colliders.boxes.count; are correct. It's just that the colliders are numbered continuously after the broad phase, starting with boxes, and then spheres.

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

2 participants