For example, the sprite function of threejs: https://threejs.org/docs/index.html?q=sprite#api/en/materials/SpriteMaterial.sizeAttenuation
It will probably be easier to use regular planes with a perspective camera in this case.
EDIT: Oh scratch that, if you set the position of a sprite on the Z-axis it will already provide the attenuation Sprites Examples | Babylon.js Playground (babylonjs.com)
Yes, I understand. What I need is that no matter how far the z-axis is, the size of sprite is fixed. How to do it?
You can change the sprite size depending on the distance to the camera:
Sprite changes slightly as the mouse wheel scrolls. This is not a good idea. The sizeattention of Sprite in three.js works well.
So is there a similar function in Babylon
By what I see on three.js’s documentation, it’s doing the exact same thing as we do.
Try using camera radius instead of distance to sprite. That seems to fix the jittering issue while zooming.