How to make object be same size on any distance?

How to make object (Actor) be same size on any distance?

1 Like

Hey newbprofi,

I’m not certain I know what you mean. Actors retain their dimensions regardless of how far your camera is from them, with exception of LOD levels with different sized meshes.

Do you meant you want to have an Actor remain in place in front of camera, regardless of where camera goes? What, specifically, are you trying to achieve?

Thanks!

I mean, object must be same Looking Size on Screen. So when i move to/from object, it must be same size On Screen.

But i dont need actor remain in place in front of camera, i need it to be where in must be according to its location in world, and it must be occluded/overlapped by other in-front usual objects.

Something like “Move-Arrows” of selected object in UE4 Editor, and non-sizable icons/gizmos when you move too close to them.

Here my another question, closely related to this: How to draw 2D Sprite (Text for example) with 3D occlusion? - Rendering - Epic Developer Community Forums

My goal - is to achieve Non-scalable Nickname or ImageIcon above Character, and this Nickname must have same 3D position like Character, just above his head. And this Nickname must be overlapped/occluded by other 3D in-front non-translucent objects (including other Nicknames), like any other normal 3D object would be.

Here example: http://danieldefo.ru/storage/images/2013/12/17/full/6fef4779-5dbf-4080-9f79-e7f12a52a880.jpg

question is, should i rescale such object every frame according to distance from camera, or there is another better way? And is there another better way specifically for sprites (Text, Icons), other than apply Text/Icon material to 3D plane above Character’s Head?

Hey newbprofi,

You can achieve what you’re looking for using a MaterialBillboard component. Add a Material Billboard to Actor’s blueprint. Then click the + to add an element to sprite, choose a material, and click Size Is in Screen Space. You’ll likely need to adjust Base Size X and Y values to get size you want. You can also change Opacity and Distance to Size using a curve, if you need something more complex.

component will be occluded by other Actors in front of it. You can also access component in your Event Graph and make it hidden if it’s a certain distance, if you need to.

Hope that helps!

1 Like

Wow, thats exactly what i need. Thx. I just didnt even notice existance of so much unknown Components inside Blueprints->Add Component, i was just reading documentation and there is nothing about these components ;d