Control
Bronze Baronet of the Realm
- 3,706
- 9,926
Good point with the camera versus pawn. Seems like something that would be pretty genre based maybe? I tend to think about things from an mmo or fantasy perspective, so in 3rd person eq/wow, I would expect to be able to target whatever my camera could see (possibly with the exceptions of reasonably out of los things). In something like a tactical shooter, it would probably make more sense to use the pawn's perspective.I never thought about the details of tab target as a player. The way I came up with doing it is to keep an array of target actors so that it doesn't attempt to repeat an already targeted actor but that array needs to expire, you have to get that expiration just right that the player doesn't think about it by the time they want it to start over it does. I did set it up to not target npcs behind walls etc. But even a simple thing of Line of sight can mean different things. If I check from the pawn or the camera. The player often thinks of the camera since its what they see but the camera in a third person setting can see things the pawn can't. It does at times target something out of your view but not out of your pawn's LOS and you may not realize where the npc you ahve targeted is without making a point of looking for it. There is feedback to know but its why I like to watch people play, some more astute than others, but fair bit of people assuming tab is targeting the mob, they the player is looking at rather than one that is closer off to their left or right
In current testing I've disabled first person , some games handle clipping issues by making your mesh invisible while in FP . I find fp makes people want to fiddle with FoV a lot and it has little upside. THe people who have play tested so far when given the choice were using third person.
Going from 'just target by distance' to 'target what the player is expecting to target' is a whole other hole to dive down lol. Grabbing the most center-screen thing first (or most-center-target-perspective-within-reasonable-distance lol) and then swapping to distance would be easy enough and might cover most of the bases. Trying to do that with the entire list might get messy, though I guess you could define a center, range, and distance as primary, and then anything within primary gets priority based on a combination of distance and degrees from center, and anything outside of primary defaults to distance). Making that logic too deep sounds like it might confuse the player as to what's happening, especially when dealing with frequently moving mobs.
Have you posted elsewhere about what you're making?