Enhex
I tried to use scene.physicsWorld.RaycastSingle() in a script, and when using M_INFINITY it doesn’t collide with anything.
Is it a bug?
I tried to use scene.physicsWorld.RaycastSingle() in a script, and when using M_INFINITY it doesn’t collide with anything.
Is it a bug?
Physics raycasts go to the Bullet library, and Bullet expects a start point and end point in space, so when you specify infinity it can’t calculate an end point that makes sense. Could add a warning for that case.
By the way, M_INFINITY is the default argument, and it shouldn’t be if it doesn’t work.
So there shouldn’t be a default argument for the physics raycasts.
Yes, there seems to be an error in the script API. In the C++ header there is no default value.