#A presence that increases in size the farther away it gets

1 messages · Page 1 of 1 (latest)

sweet silo
#

How can I do?

shadow cairn
#

with query.distance_from_camera

sweet silo
#

Can you send an example or link?

shadow cairn
#

Link to page: https://bedrock.dev/docs/stable/Molang#query.distance_from_camera

You can use an animation like this:
To set it dynamically based on distance:

{
    "format_version": "1.8.0",
    "animations": {
        "animation.entity_name.animation_name": {
            "loop": true,
            "bones": {
                "root": {
                    "scale": "0.6*query.distance_from_camera"
                }
            }
        }
    }
}

To set it based on distance you can write it directly into the animation


{
    "format_version": "1.8.0",
    "animations": {
        "animation.entity_name.animation_name": {
            "loop": true,
            "bones": {
                "root": {
                    "scale": "query.distance_from_camera > 6 ? 2 : 1"
                }
            }
        }
    }
}

or, you can animate it in the client-entity file:

"animations": {
    "far": "animation.entity_name.animation_name"
},
"scripts": {
    "animate": [
        {
            "far": "query.distance_from_camera > 6"
        }
    ]
}

Minecraft Bedrock Molang Documentation