Make cameras an object instead of whatever it is now

Please make sure to follow the forum’s rules before posting.
:cross_mark: Posts that do not follow the rules will be ignored, closed and archived

Its kinda dookie that our cameras cant be moved inside scene editor, i propose to make it more like unity/godot where its an object instead of a variable or whatever

Do you mean like move it around while making games, or move it around in the finished game?

Also, in the 3D editor you can move it around while making games :smile:

No you can’t and that what happens when you read title instead of message

And what would be use for that?
Cause as i think about it it would only benefit you if camera in editor at the same time was source of light

Or am i not seeing something?

…but it is an “object” in the way it has an angle, size, and position. you just cant see it in the scene editor, or object list, which makes sense. if you wanted to use some sort of behavior that can only be used on objects and not the camera, just, make an object and center the camera on it.

I believe he’s referring to the camera from the game’s point of view, not the editor’s.

The camera (or viewport, to use a less ambiguous term) isn’t an object that can be customized or manipulated independently like a sprite, a tileset, or any other object as in Unity or Godot, and it doesn’t have many features beyond being directly integrated into the editor’s layers, allowing you to change how it’s anchored to the game screen (Layers and cameras - GDevelop documentation).

I agree with the suggestion, but I believe this requires a significant structural change to the engine to create new possibilities.

If you’re referring to changing the starting position of the cameras in-game, you could easily make an object for this. Place it wherever you want and then at the beginning of the scene, center camera on that object.

you literally cant move the cam, wdym

Open the 3D Realtime Editor, and you can use W, A, S, D, Q, and E to move the camera around!

(Double check you are on the latest version if it doesn’t work for you!)

EDIT: I realize that I misunderstood the post :sweat_smile:

I thought you meant “move YOUR first person view around while making games” not “move the camera that will be shown when running the game while making games”. So sorry about that.

As of the current moment, it isn’t possible to :confused:

If you’re refering to the editor virtual camera then you need to be in 3D mode to do that.

image

Then you can just use W, A, S and D to move around X and Y axes or Q and E to move in the Z axis. Middle mouse button rotates the camera around it’s own axis.

Guys i feel like this post is very obviously not about that?? its about a camera object like in unity and godot — as i said in the post

I told you on discord you should go to your forum topic and explain to them what object is
As you see if no one will then they will keep coming here and giving you solutions to problem you don’t have
Even its “feature request” and not “how do i” section

1 - Not in game but in scene editor

image

2 - Layers are not objects they are just some values we can set same as camera is not object and have only values we can set (in editor)
Where in case of layers its just their order like which is above other and are they visible or not
In case of camera its just its position and our view angle and zoom to what we actually see in editor

3 - This crate is object

I can grab it from object list and put it in my scene (pro tip if something is actual object you can have it in your object list if not then its not an object)
Then i can move it around rotate it and do whatever i want with it

4 - If all that explains nothing
In blender for example we have camera object here

If i change my view angle or move my scene camera
Then this camera object will stay in its place

I can even do stuff with this camera object

I have no idea what it do but it stretched it

But clearly its an “physical” object i can interact with same as any other object

Where i still don’t get what would be benefit of that in gdevelop

Nothing in this world is obvious enough that doesn’t need a detailed explanation, specially in the software and game development field.

What this post needed was exactly what you did in your reply to this post: [Feature in backlog] 3D navigation in the editor - #47 by cokiesyum

I’ll try and explain to help everyone:

  • Unity : The camera is an actual GameObject with a Transform (position, rotation, scale) and a Camera component. It exists in the scene hierarchy alongside players and enemies. You move it by modifying its Transform or adding scripts/behaviors to the object itself.
  • GDevelop : The camera is an abstract viewport tied to a specific Layer . It does not appear in the scene object list. You cannot “select” a camera in the scene editor; instead, you manipulate its coordinates (X, Y, Zoom, Angle) via Events or by applying Behaviors to other objects (like the player) to tell the layer’s camera where to look.

So in gdevelop you would usually create an external layout to handle all your camera functions then call it on every scene.

If you don’t do it that way you are either copy pasting your camera events between scenes or manually recreating them.

Unity you basically setup your main camera 1 time and it gets auto created for every scene.

Unity say doing isometric 3d scene just configure your main camera object 1 time.

Gdevelop create an external layout but you are also associating that camera with another object say player character.

Now how about it’s a rpg party game and in the story the main player is captured and missing for a scene.

You use events call your external camera layout and boom failure cause the player you tied the camera to is not in scene so now you need a 2nd camera layout tied to a different object.

Gdevelop it’s a simpler approach for simpler games and works well in 3d platformers.

But once things get complicated the simpler approach actually becomes more difficult.

And it’s not just unity nearly every 3d engine has a camera object. Gdev started fully 2d so I can the reasoning. Just like unity started 3d and can struggle with overall 2d concepts.

It’s basically a fundamental philosophy difference of how the game engine works.

But if 99% of all 3d engines do it the question is why doesn’t gdevelop do it then too?

The primary answer is that GDevelop is not a 3D-first engine like Unity. It’s 2D-first, like Defold or Phaser. Even Godot’s 2D camera generally works this way.

Defold’s static and orthographic camera worked pretty much just like GDevelop’s before they added a 3D camera, and the 2D camera is still the preferred way for 2D (or 2.5D) focused games.

That said, I do hope they eventually add an easier way to deal with 3D camers for folks that are focused on that, I’d bet it is pretty unlikely to see that method transfer to 2D since they’re different renderers entirely.

Doesn’t mean it won’t ever happen, just not likely.

Also, you don’t need an external layout for camera controls or events, and you probably shouldn’t use it unless you absolutely need a custom/specific sprite object on the scene to represent your camera.

  • If you don’t want to set up a function, at the most basic level you’d:
    • Use an external event sheet (not layout) for your camera events
    • A group of objects called “camera controllers” that can include any object you want to be able to control the camera
    • A boolean variable on that group “curController” or something that you can set to true.
    • Have your external events follow whatever object currently has that variable set as true.
    • Then just include the external event and set the variable on an object that’s a member of that group whenever needed.
  • However, you really should just set up a function/events-based extension if you have complex camera events, and then just have an action in your sheet that lists something like “focus camera on ObjectName”, that way your camera events can target whatever object you want. This more closely matches how cameras work in Defold/phaser/elsewhere if you’re going to make a resuable one.

External sheet or layout I am probably confusing my terminology. Tbh I just call a customizable JavaScript file for my 3d projects I find it a billion times faster to setup the camera that way.

You can do this with the Gdevelop extension system.

Is there van extension to make a camera a resource object in the scene or is some kind of fake out pseudo thing trying to replicate that behavior but not a 100% real object like other engines?

If so please link I’m curious.

Do you mean fan? There isn’t any extension (that I know of) that does what you intend but it wouldn’t be hard to make. You can create a prefab and then set the camera settings of the layer the prefab is on based on the object properties (like X, Y and Z).

If it’s just for your own project why go thru the hassle of making it an extension when you can just use straight JavaScript to do it.

What gdrv needs to do is look at the playcanvas 3d editor since that project is fully open source too.

If gdevelop had that editor it would be amazing