Hello everyone,I'm a newbie to Godot, and I apologize for not having excellent English skills, but I will try my best to explain my problem clearly.
I am working on a 2D isometric game prototype with randomly generated terrain. However, I have a critical issue: I cannot use slopes to allow my character to reach other layers. My current idea is : when the player enters the "slope area" ,check the difference in the z index (or layer) between the player and the slope. If the player's z index is less than the slope's z index, then when leaving the "slope area", increase the player's z index, collision layer, and collision mask by 1. If the player's z index equals the slope's z index, decrease them by 1. Also, Also, if the player is in the "slope area", set the player's collision layer and collision mask to a special value (such as 32) to prevent unnecessary collisions with existing terrain.
However, I'm not sure if this approach is effective, and most importantly, I'm unsure how to set up the "slope area." I've considered using an Area2D node to define the "slope area," but the terrain is randomly generated, so I don't know where the slope will be generated. Therefore, the Area2D node doesn't seem to work directly on the slope terrain. So, the problem is I don't know how to "set up a detection area for the slope terrain." Could anyone please teach me how to do this? Thank you very much.