carenalgas / popochiu

Godot plugin to make point-and-click adventure games, inspired by tools like Adventure Game Studio and PowerQuest.
https://carenalgas.github.io/popochiu/
MIT License
207 stars 19 forks source link

Refactor the way walk_to_point and look_at_point are used by client code #316

Open stickgrinder opened 1 month ago

stickgrinder commented 1 month ago

Description

Working on #233 we noticed that both walk_to_point and look_at_point need to be transformed to global coordinate during game execution.

Formerly a getter was present, to return the local or global coordinates of those points depeing on the execution context (in editor or in game), but that remnant was creating more harm than good and the function was unused.

Now the calling code globalize the positions in its own way, providing defaults as needed. We can make things more coherent if we create two specific methods the client code can call from the clickable to get the global positions of those coordinates, maybe with sensible fallback defaults.

stickgrinder commented 1 month ago

Mentioning @drbbgh