Hello, apologies if this is too big of a request! But I saw Violet’s lovely work here https://twitter.com/violxiv/status/1636373161246859267/mediaViewer?currentTweet=1636373161246859267¤tTweetUser=violxiv and this is EXACTLY what I have been looking to do with my models so that I can quickly switch out face parts and hands. I’m just not sure where to even start?
#Walk me through Variables?
1 messages · Page 1 of 1 (latest)
Thank you! And this may be a silly question, but do the variables only apply to meshes? Or could I adjust the texture itself and create different eyes (for example) on different textures and swap through them with variables?
You can only use variables in keyframes of groups.
You can use them in any math expression to move/rotate/scale groups of course, here the trick is to scale keyframes in a looping animation of 0s length to show or hide parts of the model depending on a variable value.
The closest thing to what you're asking that exists in Blockbench is using "preview.texture" in the Bedrock entity format. It works a little bit like a variable, but you cannot use instruction keyframes to modify it during an animation, you can only set it manually.
So for now, you'll have to create multiple geometries for the different eyes you want to have, and nest them in different groups. And use an animation to scale them all depending on a variable.
okay! thank you so much!
does thos variables work in game ?/bedrock i am just curious
You'll have to reproduce these variables on an entity client-side, they won't create themselves. If they are not initialized, Minecraft Bedrock will throw an error.
(https://bedrock.dev/docs/stable/Molang#Public Variables like variable.oink here, if you're not familiar. Checking out the Vanilla Resource Pack will give you plenty of examples too)
To modify the variables after they got initialized, you can use pre_animation (https://bedrock.dev/docs/stable/Molang#Entity Definition Scripts) to update variables every frame, or instruction keyframes in animations, or use the *on_entry *and *on_exit *properties of Animation Controllers.
!close