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

Update cursor shim to respect disabled colliders #173

Merged
merged 1 commit into from
Dec 8, 2016

Conversation

stevenvergenz
Copy link
Contributor

No description provided.

return !e.object.userData
|| !e.object.userData.altspace
|| !e.object.userData.altspace.collider
|| e.object.userData.altspace.collider.enabled !== false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double negative is odd. Just || e.object.userData.altspace.collider.enabled would be enough

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, because it needs to default to true, whereas undefined properties evaluate to false.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, good point

@stevenvergenz stevenvergenz merged commit de63362 into master Dec 8, 2016
@stevenvergenz stevenvergenz deleted the bug/cursor-shim branch December 8, 2016 01:52
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.

2 participants