Rework and document CharacterSight and PlayerInteraction#2078
Conversation
Use body_entered and body_exited signals for obtaining the best area, instead of doing it in the process loop. Rename the node InteractZone in player to CharacterSight and give it a class name, moving it to game_elements.
Adapt to the recent changes in player.
|
This is extracted from #2073, in which I'm trying to highlight the object that can be interacted. That is the object currently being observed by the player (the one showing the interact label). |
|
Play this branch at https://play.threadbare.game/branches/endlessm/rework-player-interaction/. (This launches the game from the start, not directly at the change(s) in this pull request.) |
There was a problem hiding this comment.
I think it's a bit weird for this to live in props rather than player.
There was a problem hiding this comment.
Hmm, I did it to match interact_area. But also this can potentially be attached to a CharacterBody2D NPC.
Maybe I move it to scenes/game_logic/ ?
There was a problem hiding this comment.
Could work. Honestly I think it's also quite strange that this script (not a scene) lives in scenes/, like many many others (e.g. area_filler.gd) but I can't bring myself to propose rearranging all the folders in the project again :)
There was a problem hiding this comment.
Don't feel the need to address this now, it's just a path, we can change it later. I was just observing that it seems a bit strange
There was a problem hiding this comment.
Yes the whole structure is strange to me as well!
Use body_entered and body_exited signals for obtaining the best area, instead of doing it in the process loop.
Rename the node InteractZone in player to CharacterSight and give it a class name, moving it to game_elements.
champ & after_the_tremor StoryQuests: Adapt to the recent changes in player.