Use this space for questions related to what you're learning. For any other type of support (website, learning platform, payments, etc...) please get in touch using the contact form.
Found a typoDMK'If we look at the method list of the `RayCayt2D` node, we can see a method named...'10Jan. 13, 2025
Bouncing rays?HardRockWould the RayCast2D Node be the way to go if for example I would need to do a visibility check towards the player from an enemy, but using a reflective surface (a simple bool property could be checked for this on the object that we hit I guess)? Based on the documentation RayCast2D by itself doesn't seem to be able to handle ray bounces, but since it can return the surface normal from a collision, I guess this could be used to create a new RayCast2D Node at the point of collision, with the surface normal modifying the original ray direction. Not sure how feasible this would be in practice though, as I would need to create and destroy RayCast2D Nodes dynamically, based on the number of collisions with reflective surfaces, and use the last ray's collision only for the player visibility check.
This feels like its outside the scope of the curriculum, so I don't expect a very detailed technical response, but with ray tracing all the rage nowadays, my mind started wandering. :)20Dec. 31, 2024
Lesson Q&A
Use this space for questions related to what you're learning. For any other type of support (website, learning platform, payments, etc...) please get in touch using the contact form.