Performance benefits for new raycast functions?

I’m working with a slightly older codebase for a game that uses a lot of raycasting. It uses the old Ray.new() and the methods of workspace for raycasting and I’m wondering if there are performance benefits by changing these to the new workspace:Raycast().

I’m aware methods like workspace:FindPartOnRay() are deprecated but I’m mainly wondering if updating these everywhere in my codebase have any impact on performance. Obviously in new work/scripts, we’re using the non-deprecated methods. Any insight on this is appreciated.

This is just a suggestion, I don’t have benchmarks but I would personally replace every deprecated application in my codebases. They are usually deprecated for a reason.

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.