Need help with viewports

Godot 4.2.2

So I’m hoping someone can help me out here because I can’t figure out where I’m going wrong. I’m trying to use a separate viewport to display the weapon in an FPS game in order to avoid it clipping through the level.

I’ve setup a subviewport camera on a separate layer and assigned my weapon models to the same layer, however there are two problems with this. First of all, the entire level is not being shown and neither is the Canvas Layer. Secondly, the models appear on screen very pixelated.

This is the result:

And here’s my node setup:

Any suggestions for where I’m going wrong wold be appreciated. Thanks

I think you need to enable transparency on the subviewport. And as far a pixulation goes it is probably related to the subviewports resolution being smaller but stretched to fill the screen.

I already enabled the transparent background for the subviewport but oddly it does still look like an issue with transparency. Now with the scaling, I’ve set the anchor preset to “Full Rect” and the size X and Y properties are the same as the main window. Is there another setting I’ve missed somewhere that needs to be changed for the resolution? I tried messing around with the Scaling 3D properties but nothing seemed to make a difference.

1 Like

There is a canvas size and a resolution size for the subviewport. Is resolution size set appropriately? I just want to make sure we aren’t just talking canvas size.

If you are talking about the project scaling options. I don’t think this will effect subviewports. They would need to be managed manually I believe.

Well I seem to have the size property here but I’m not sure if this is referring to the canvas size or the resolution size.


I think that is it.

I’m not sure what the problem could be.

Well thanks for your time anyway. I’m thinking of trying to achieve this with shaders instead now.

1 Like