How do I… let the player toggle between 3d and 2d orphographic?

I am building my first Gdevelop game inside of the 3d platformer demo. I want to give the player the ability to switch to a 2d view for gameplay reasons. Think Super Paper Mario on the Wii, but in reverse.

Is this even possible? I can figure it out if so, but as mentioned… I am new with the engine. Please and thank you for any help!

Here’s an idea but it realy depends on what effect you wan’t to achieve and how. I have played the Super Paper Mario game which is a fantastic game but here’s a suggestion on how to make your idea,

Create 2 layers in your game engine :

  • 2D_platformer
  • 3D_platformer

Then proceed to create the world in 3D then it’s version in 2D.

Lastly code something like this :
if var == 0
hide layer “2D”
show layer “3D”
elseif var == 1
hide layer “3D”
show layer “2D”
end

If this isn’t what you wan’t to achieve but more have a world originaly in 3D but when switching to 2D rather than changing the whole stage you just wan’t to change the camera well what you could do is move the camera to be behind the player when in 3D so that the world is seen 3D but when in 2D set the camera to be exactly 90 degrees on the side so that it all looks flat.
Then set the same variable logic as before but for the player movements since they won’t be handled the same in 2D and 3D. Depending on a variable value switch the player movements

1 Like