godot-proposals icon indicating copy to clipboard operation
godot-proposals copied to clipboard

UX: Instancing nodes in front of the camera

Open H2xDev opened this issue 8 months ago • 2 comments

Describe the project you are working on

A survival horror game.

Describe the problem or limitation you are having in your project

While game development we can create nodes in the scene. It works good, but if i have a large scene and trying to create a light node for example i need to move it from (0,0,0) to the place i need. Would be good if all nodes would appear in front of the camera instead of (0,0,0)

User case video: https://www.youtube.com/watch?v=K5j11r2Fbsc

Describe the feature / enhancement and how it helps to overcome the problem or limitation

This is just QoL feature

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

It can be solved by one raytrace operation from the camera of the last active viewport. If the ray has collision point, then we place the created node in the collision point, otherwise in (0,0,0)

If this enhancement will not be used often, can it be worked around with a few lines of script?

I could be worked around

Is there a reason why this should be core and not an add-on in the asset library?

I think it should be expected behavior of the engine in this case (in my opinion)

H2xDev avatar Mar 20 '25 10:03 H2xDev

Related #435 Doing this by default could often get in the way, e.g. when creating a scene root.

KoBeWi avatar Mar 20 '25 11:03 KoBeWi

Related #435 Doing this by default could often get in the way, e.g. when creating a scene root.

That's why i suggested the way with raycasting and collision. In case there's nothing to collide with then the node will be placed in zero.

H2xDev avatar Mar 20 '25 12:03 H2xDev