RaycastParameters can no longer be adjusted in parallel, making it incredibly difficult to run raycasts in parallel scripts. Specifically FilterDescendantsInstances can’t be set
Expected Behavior
The original behavior of ParallelLua allowed for FilterDescendantsInstances and it worked perfectly
Actual Behavior
Both in game and in studio Parallel scripts trying to raycast error out because FilterDescendantsInstances no longer works in parallel
Workaround
No
Issue Area: Engine Issue Type: Other Impact: High Frequency: Constantly Date First Experienced: 2022-05-12 00:05:00 (+12:00) Date Last Experienced: 2022-05-16 00:05:00 (+12:00)
Thanks for reporting this. This was actually a planned change to the parallel Lua API surface that we were rolling out as we prepare for release. To fix thread safety issues, the easiest thing for us to do was to mark this property thread unsafe. We assumed most users would set up one set of RaycastParamaters with a static set of filters in the serial phase, and use that object over and over in the parallel phase.
Would you mind sharing a bit about what your code is doing that requires changing the filter list during the parallel phase?
It just creates new raycast parameters everytime the function is called because for ease of use I wrote a function that can be called like the old workspace:FindPartOnRay’s but uses the newer more efficient raycast system.