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

Fixed a bug that would incorrectly calculate the intersection points in SteerForSphericalObstacles #58

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

CowboyCoderForever
Copy link

I believe the Pythagorean theorem code should have a subtraction, not an addition. While debug rendering the calculated intersection points, the original code could generate points that were wildly off. Changing the formula now generates the intersection points directly on the radius of the sphere/circle.

This might not have much impact on obstacle avoidance (the original points would indeed steer the vehicle away from the obstacle) but it should allow the vehicles to have a closer tolerance to the obstacle.

…of a ray on a sphere in the SteerForSphericalObstacles behavior
@CowboyCoderForever
Copy link
Author

Note - the code in the Ray-Sphere intersection method aligns nicely with this page: http://kylehalladay.com/blog/tutorial/math/2013/12/24/Ray-Sphere-Intersection.html

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.

1 participant