Wouldn’t it make more sense to have Mouse.Target be a descendant of a Instance we can set with SetTargetList?
The constraints: The argument must be a Instance inside of workspace as a child or descendant
The behavior: Everything NOT descended from this instance (not including the instance itself) Is not targeted by the mouse for Mouse.Target. This may save on resources because it allows us to choose if we want a small list of parts to target, AND furthermore it allows us to ignore multiple instances (such as Instances inside the camera, and instances outside the camera, which allows us to ignore both client and server-replicated objects at the same time.)
This deprecates Mouse.TargetFilter, but it gives more functionality to the mouse itself
A player in tiny tanks can be expected to be casting 20 bullet rays and 16 tank movement rays per frame. Then all the logic, collision detection, animation, interpolation, and other operations. Lots of people seem to be under the impression that doing a lot of work in lua will lend to performance hits when that’s simply not true. If you know how to write performant code then you can execute loads of operations every frame.
What is the benefit of using Target/TargetFilter over raycasting? There is no point in upgrading a weaker API just to put it on par with an existing API.
I’m confused. Lets say I’m trying to put a part where the user clicked while ignoring a glass barrier between the location and the user. If you dont use targetfilter, the part gets placed on the glass itself instead of beyond it. The mouse instance can do that super easily and simply. How would you do it with raycasting? I’m not that great with rays so I’m genuinely interested.