-
-
Notifications
You must be signed in to change notification settings - Fork 23.1k
fixed invalid implementation of Plane::intersects_segment and Plane::intersects_ray #24897
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
Conversation
Could you squash commits together? |
Thanks! |
I was notified by email that this apparently broke the GridMap editor plugin. Haven't checked yet myself. |
Rather strange. Well, if it broke something, code should be returned in the previous state (it was already done, I know). But I derived the formula on a paper, more than that, in my project my version works, but not older version. Unfortunately I have not enough time to look more detailed all this situation. If one can make unit-tests or something like that to make sure plane intersection methods works as needed (not plugin mistake or something else), it will be great. @akien-mga here are some links: Note the same sign of summands in the numerator: |
I'll revert it for now (#24964). Can be reassessed once 3.1 is released with a proper review of the equations and their use in the engine. |
@GlaDos28 I suggest running a recursive grep ( |
Corrected intersection point formula: the main mistake (or misprint) is positive sign of dot product in
dist
variable. One can manually check on paper that there are both negative signs of summands.Tested the same manual function analogue in GDScript, in my project it works, unlike the previous version.