• 0

    posted a message on Raytrace to fluid boundary

    I’m trying to perform a ray trace that stops at fluid boundaries. This is pretty trivial if the ray starts in air - I just have to use the API to cast a ray with FluidMode.ANY.

    However, the tricky part comes when I want to cast a ray from inside water. I then want it to travel through fluid (easy enough)... and STOP when it hits air.

     

    How can I approach this (ideally with an eye on efficiency)? In an ideal situation, I would be casting many rays like this, and potentially quite far.

    Posted in: Mod Development
  • To post a comment, please or register a new account.