Ideas for improved mouse-over highlighting in 3D space

I’m working on a sidescroller where the player runs back and forth the aisle of a train. The player will need to be able to select seats as well by hovering the mouse over the seat (i.e. for throwing things to certain seats). I’ve got a working concept, but I’m looking for some good ideas on how to improve on the highlighting mechanics, as the current implementation has some issues.

Currently it gets the hit result under the cursor, and if it is a seat it will highlight that seat. The problem start showing when you try to select the inner seat of a double-seat, as proximity, visual overlap and perspective can make the margins for selecting the right seat quite small. I made a 40 second video which might help illustrate it better (if you can ignore the quickly slapped-together visuals of everything). It is particularly visible about 20-30 seconds in.

So the question is, does anyone have any good ideas on how to improve this to make it easier for the player to select a specific seat (keeping in mind the player will be working against timers)? Are there changes I can do to the current implementation? Are there perhaps a completely different implementation that would be better suited? I have been trying to move the camera position a bit to make the seats more visible to the player, without finding a good balance. Whilst it would solve it by making it top-down, I’d rather not go there as it would ruin some of the aesthetics I’m going for.

For the record, this picture shows the current blueprint implementation. It runs of the tick in the player blueprint. The “Highlight” event it references when casting to BP_Seat simply toggles visibility on the transparent red cube object I use to show the highlight.

I would move the logic to the Chairs themselves and on the main mesh ( volume ), I would create these two events from the details panel:

Let the chairs contain the logic for what happens when they lose or gain hover focus, and remove it from the controller/player.

Also be sure to enable the Mouse Over Events in the PlayerController:

Thanks for your reply. :slight_smile:

Indeed, the current location of the scripts are not ideal. It ended up where it ended up for prototyping purposes (you know, you put it in there because you already had that window open :stuck_out_tongue: ) and haven’t exactly been optimized. When I get to the point where I start optimizing stuff I’ll probably do something similar to what you have suggested.

That said, the main problem remains untouched, namely finding a good method for the player to be able to select the right seat when you have multiple seats close to each other.

I’m not sure if that is intuitive.

But what about giving the “back” seat a hitbox that’s larger than the “front” seat. (Viewed from the camera).

You have quite a large hitbox for the player to hover over when selecting the front seat. The whole of the chair. Maybe the whole empty area above seats / in front of seats could result in a hover of a back seat.
Which would at least make it more easily selectable.

As I said. It might be not at all intuitive to the player.

With mouse over select only row (and maybe side of walkway, ie behind pawn or between camera and pawn). Then select if its seat next to window or corridor depending on Z axis.

For eg if player hits any point from first row chair mesh record it as first row, but when player does not hit first row chair mesh and cursor is above some Z value assume it is second row.