r/ComputerCraft • u/TheGenieInTheLamp New at this lol • Dec 22 '23
CC:C Bridge Animatronic.
I checked the wiki and I checked thru pages. I literally don't know how to use this. Could anybody give some advise or atleast have a simple little code so I could understand this?
4
Upvotes
3
u/toasohcah toastonryeYT Dec 24 '23
So taking a deeper look into this animatronic thing, it looks fairly complicated, definitely more complicated than I first assumed, for me at least...
https://cccbridge.tweaked-programs.cc/guides/positioningAnimatronicsBlockbench/#baking-the-animations
It's kind of interesting though, I guess Blockbench is a 3d modeller for Minecraft? And you can program your animation in that program, then export the animation data.
The final step, is to parse the data in Lua, which the guide is quick to mention is the hardest. Neat, had no clue that existed.
2
u/toasohcah toastonryeYT Dec 22 '23
I had a quick look at the wiki, it looks like it functions like any other peripherals. What exactly are you trying to do?
2
u/EinBaumeister Dec 30 '23
Hey, I'm the dev of the mod. The wiki indeed is missing some examples, sorry.
The animatronic can be fully rigged. You can give it a pose that it should take. Once you have the peripheral, you can use the listed functions to determine the rotation of every body part.
For example:
animatronic.setHeadRot(0, 45, 30)would tell it to rotate the head.Now, the rotation doesn't get applied instantly. It first gets stored in an temporary buffer of the peripheral. In other words: You need to call
animatronic.push()To apply the changes! After that, the animatronic will start moving on its own to apply the new position.Changing the face doesn't need
.pushas an single exception btw. And that's pretty much it on how to use it. If you need something visual to rig the animatronic, you can play around with the model in Blockbench and extract the numbers. Btw. if you do want to write an serializer: The wiki is not fully right about the format, Blockbench is a bit more complex...I hope this helps! I will eventually update the wiki to make this much easier to adapt, once I have more time again.