Wow, busting out the “soon
” again after so long?
This is a lovely change! I look forward to using this new method!
they said exclusion takes priority, it would get excluded
the raycast operation itself is more optimzied if you use include/excludeinstances, he was specifically talking about the AddToFilter method’s execution time
I doubt this would be needed?
Since you can easily do IncludeInstances = CollectionService:GetTagged(“Tag”)
I’m sure :AddToFilter was never about performance for most users - It is simply a clean and convenient way to… Add to the filter! Without needing to reassign the table.
I think many people would like an equivalent.
It seems kind of pointless to have both of these arguably good additions to RaycastParams be read only. The work around is pretty simple but it seems kind of pointless.
This is a pretty nice addition + The performance boost is really nice to have! Cheers to everyone that worked on this
I’m really happy to see this, thanks physics team this is amazing!
What’s… the issue?
22 results isn’t a lot, it’d take less than an hour to change.
Not to sound rude, but whats the actual issue behind creating your own wrapper for overlap/raycast params?
local instances = {}
local newInstance = workspace.Terrain -- example
params.ExcludeInstances = instances
-- add:
table.insert(instances, newInstance)
params.ExcludeInstances = instances
-- remove:
table.remove(instances, table.find(instances, newInstance))
params.ExcludeInstances = instances
You could even turn this to a module script to make your main scripts look cleaner.
Nice change made eitherway.
This will definitely boost performance and flexibility.
The issue is that this is such an incredibly common use-case that developers shouldn’t be forced to create their own wrappers for it. There should either be methods on the params for it or table.insert and table.remove would preferably work on ExcludeInstances and IncludeInstances directly if that was reasonably possible in engine.
This will be really helpful, thanks
Unfortunately they effectively have to be readonly. If they were not readonly it would be very natural to try to write this and be confused when it does not work:
table.insert(params.ExcludeInstances, hit)
This is MASSIVELY useful, thank you so much! Give whoever made this feature a raise!!!
It’s specifically so I don’t have to create my own wrappers from either functions I insert or modules I require, just a neat little QoL change for the API that technically already existed via :AddToFilter
Forgive if I misunderstand anything technically, but would a material exclude/include list also be possible? Such as including only specific material, ie- querying only Water
I don’t want to have to make a wrapper for something I use all the time that was previously just built into the engine. Basically what @TheGrimDeathZombie said
I agree that it should be added.
All i was mentioning is that wrappers or these sort of implementations could be used for overlap/raycast params for the time being, it isnt that much of a problem.

