Godot Version
4.7.1.stable
Question
Hi, it’s me again, working on the same project. It’s a 2D platformer that’s constrained to set planes in 3D. The entire physics and characters are in 2D space.
I’m trying to build a system that allows an enemy to track down the player and get in melee distance. It has to know where the platforms are, where it can jump to and from, and to consider when it can drop down a platform to reach a destination faster.
Also, as a part of translating the 2D to 3D, my characters have to teleport a lot in 2D space. It looks perfectly smooth in 3D, but the 2D logic needs to teleport in order to achieve the effect I want to produce.
The main problem I’m facing is that my game doesn’t use a tilemap, it’s a bunch of StaticBodyes thrown around with intention. On top of that, the player can press the down button to drop from the middle of a platform and phase through it, and I want the enemies to be able to do the same.
The best piece of study I found in the matter is this video, where a guy does most of what I want to do, but in Unity. The thing is, the video isn’t a tutorial, it’s more of a devlog. It does say what they did to achieve this goal, but not how they did it.
Complimentarily, I also found this series of videos, which shows just how to make the navmesh, but it’s entirely on a grid map, which my game isn’t constrained to. Should I just use a grid map with 2x2 px cells?
What I’m asking is just how to approach this problem. I can probably finish it after some advice, but I kinda don’t know where to start, again. Mostly, how do I simulate several frames ahead of physics, for the jumps, and how do I make a navmesh for this kind of game? How do I tie teleportation to that navmesh? I know the teleporters probably should have a weight of 0 on the A* algorith, as it’s just how entities move around in the game, no effort needed to do so, but I don’t know how to make them.
I appreciate anyone who even reads this post up to this point. I know I’ve been asking for a lot lately, but I’m here to learn, and I’ll try to learn as much as I can.
