You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it would be great to have some sort of mechanism which can tell you which index in an array of colliders your ray interested with. This could, for example be useful in raycasting games perhaps to differentiate between multiple different wall textures or determine if a ray hit a wall or an enemy.
As for how this api could be implemented, there are probably a couple ways to go about it, for example:
I think this is cool, and I'm leaning a bit more towards adding nothr function rather than modifying the existing one, especially because we could add special arguments as well.
I was thinking we could have an optional argument like index_from that lets you pass a list and returns you the actual object in raycast and a list of objects in multiraycast. I've seen you've suggested this for the single ray raycast, what about the multi one?
I think it would be great to have some sort of mechanism which can tell you which index in an array of colliders your ray interested with. This could, for example be useful in raycasting games perhaps to differentiate between multiple different wall textures or determine if a ray hit a wall or an enemy.
As for how this api could be implemented, there are probably a couple ways to go about it, for example:
Alternatively to avoid modifying existing api, we could introduce something along the lines of raycast_with_index
With either option, the same would be needed for multiraycast.
The text was updated successfully, but these errors were encountered: