Creating "2D-Tile" camera view in 3D engine?

Godot Version

4.3

Question

I'm making a 2d top-down RPG but I need certain things that are best done in 3D, so I've set up the engine in 3D but want to project it to look like 2D tiles.

When I started, I got an orthogonal camera set up at a downward 45-degree angle, plus a simple script that stretches the parent Node3D by the square root of 2 in both the Y and Z axes to achieve the tile-based look in the 3D engine.

This is what it looks like without the scaling effect applied.

However, I soon realized that the player motion and other physics now all looked incorrect because they were not affected by the scaling, so I want to find a different way to go about achieving the perfectly-square tile look.

Can anyone help guide me in the right direction on getting this set up correctly?

How come you can’t just rotate the camera 90 degrees?

If you mean having the camera just point straight down from above, that’s not the perspective I want. I essentially want to recreate what Enter the Gungeon did, which was use 3D environments but make the perspective cause everything to look like tile-based 2D.

Here’s a forum post about achieving this effect in Unity: unity - How can I set up a 3D camera for a top-down game like Enter the Gungeon? - Game Development Stack Exchange

So you’re looking for a 2D Isometric View?

No, I’m looking for a top down view. This is what enter the gungeon normally looks like during regular gameplay:

The image I posted before was a dev screenshot where they showed the game was technically running in 3D.

Thats the effect I want to recreate. A 2D, top-down, tile-based look, in a 3D space.

Kinda like this?

I used a normal perspective camera with position.y = 9.0 and rotation.x = -90

That’s not the effect I want. I want to create something that, from the players point of view, the game looks like a 2D top-down tile-based game. But in reality, the game is running in 3D and is using some perspective tricks to make the game look like its 2D.

Another example of what I want the final product to look like is Undertale.

Essentially, i want to turn a 3D world into this view.

Ok, so a 2.5D game, but no projection.

2D characters running around in a 3D world. I believe you may be wanting to use a Frustum Projection Camera3D and use y-shearing to get the effect you want. That’s my best guess.

Someone on the Godot Discord helped adapt a Pull Request for the engine that would add the option to set a custom camera projection matrix, which achieved what I wanted.

1 Like