Make Mouse.TargetFilter a list instead of a single Instance


#1

Mouse.Targetlist is a great way of ignoring certain models from being hit by the mouse.Hit value.
Link: http://wiki.roblox.com/index.php?title=API:Class/Mouse/TargetFilter

It has some drawbacks tho, you can't use it on all players unless you put all players in a model and set targetfilter to that model. Even so, you might have some bushes and stuff that shouldn't be targeted, then you need to choose between what to hit and what not to hit.

SURE! This can be solved with raycasting, anyone can see that. But it's very redundant when we already do that once with mouse.Hit so it'd just waste CPU. Raycasting is also much more complicated (no don't show me your code skills) than just doing mouse.Hit.

I feel like this is a small change with great impact that's why I suggested it.


#2

Support. Had some places it would've helped in 3rd person games.


#3

Someone went over this on another topic. I support nontheless


#4

This has already been discussed

http://devforum.roblox.com/t/mouse-settargetlist-instance-i/22620/28


#5

Oh, well to give a point that was not presented in that thread:
It should be added because
1: Roblox calculated mouse.Hit wether or not I use the value, doing additional raycasting is bad for performance.
2: The mouse.Hit is a SUPER simple way of getting what you want without having to do all the raycasting things.
Just like Camera:WorldToScreenPoint was added, so I think this should be upgraded to ease the development of games.

But primarily, since you already calculate the mouse.Hit object, why cant you return a value I can use instead of just wasting my cpu?


#6

That thread was talking about making mouse.Hit have a list of targets and ignore everything else, this is talking about making mouse.Hit use something like FindPartOnRayWithIgnoreList, right now it just works like FindPartOnRay.


#7

Has this been shipped already? It would be a neat improvement.