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
Reinstate original version of projectOnPlaneToRef with small amendment #12827
Conversation
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://babylonsnapshots.z22.web.core.windows.net/refs/pull/12827/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/12827/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/12827/merge#BCU1XR#0 |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://babylonsnapshots.z22.web.core.windows.net/refs/pull/12827/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/12827/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/12827/merge#BCU1XR#0 |
O #12663? |
Is that a fix for #12663 ? |
result.set(origin.x + x * hitDistance, origin.y + y * hitDistance, origin.z + z * hitDistance); | ||
//When the ray is close to parallel to the plane return infinity vector | ||
if (Math.abs(denom) < Math.pow(10, -10)) { | ||
origin.addToRef(new Vector3(Infinity, Infinity, Infinity), result); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could it be result.set(Infinity, Infinity, Infinity) instead ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly, I will check but will not be until tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BabylonJSGuide the unit tests shoudl probably be changed as well to adapt to the new "old" code :-)
It is. |
I am a bit confused about new system. Need some instructions on how to deal with the two failed checks. |
You can go in this file https://github.com/BabylonJS/Babylon.js/pull/12663/files#diff-7ad717d6f28a942a7f6dbc8c90e8071a0994061fd11be3a1b4bb4aeeff2740d0 and change the values to be covered by a unit test ? |
@BabylonJSGuide I ll do it for you :-) |
Thank you |
Closing in favor of #12831 to have it in before the npm build, Thanks a lot @BabylonJSGuide |
Ref https://forum.babylonjs.com/t/project-3d-point-on-plane/9862/18?u=johnk