check both positive and negative axis's for inside mesh#47
Open
Happyrobot33 wants to merge 1 commit intoskybrush-io:mainfrom
Open
check both positive and negative axis's for inside mesh#47Happyrobot33 wants to merge 1 commit intoskybrush-io:mainfrom
Happyrobot33 wants to merge 1 commit intoskybrush-io:mainfrom
Conversation
Member
|
Thanks! I'm a bit worried about the performance implications -- this means that we need to cast twice as many rays to check for containment thatn before. Just to understand the context: were you getting false positives (i.e. drones lighting up when they were outside the mesh) or false negatives (drones not lighting up when they were inside the mesh)? Was the mesh concave or convex? If you have some time, please show an example screenshot (not necessary to proceed, just curious). |
Contributor
Author
Contributor
Author
|
one different way to do this I presume is to start the ray at the positive axis offset, and end it at the negative axis offset. half as many rays, they just go twice as far as before |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This fixes an issue I encountered where drones nearby a object that was set with a LED effect as inside mesh would be lit up depending on their orientation to the object. This is because the raycast check that was performed is only done for the 3 positive axis's, not the negative. Editing this array to include both positive and negative axis's makes this check significantly more consistent