Godot Version
v4.3flathub
Question
Hi all, I am looking for some general advice on creating an elevator that stops at a floor that the player chooses. I am unsure what approach to use here.
Currently, I am trying to set up an AnimationPlayer with keyframes representing the different floors and then moving between those keyframes in code based on user input. However, I have read the documentation and I’m still unsure how to transition between specific keyframes in code. The below method seems to set the value of the key which could be useful to generate the keyframes in code but I’m unable to see a way to move between keyframes in code depending on user input.
I also found some advice to use a Call Method track where you call a stop() method on the animation when the correct floor is reached. Again I understand the logic behind this but it’s actually implementing it that I’m not grasping. Is this is a better approach than the above?