Make size of world object resolution independent

In screen space it is easy to maintain the pixel size of an element if we change the resolution.

I’m trying to do the same for an object/mesh in world space by adjusting its scale.

But dividing by the values from ‘Get viewport size‘ doesn’t do anything, although it returns the correct value.

‘Get screen resolution‘ is also not helpful as it is not the resolution the game is currently running at.

So, how to maintain the pixel size of an object in world space?

I don’t follow; send a mind-bug..

Trying to picture this but I cannot visualize. You want the on-screen coverage of a thing to always be the same size independent of the screen-res? eg: this thing always takes up x% of the screen, period?

Same size in pixels not percentage-wise.

E.g. an object with size x meters, y meters away from the camera has always a size of z pixels on the screen no matter the game resolution.

oooooooooooooooooooooh hmmm, let me think, i don’t have an answer, but if can i will be back

1 Like

how are you setting the scale? it sounds like thats the problem. i bleieve its called “Set Relative Scale 3D” and you need the mesh component to be the target

That’s exactly the way I’m doing it, triggered from a tick event.

The ‘get viewport size‘ node is marked as ‘cosmetic‘ and ‘client only’.