1. I moved the "on activate of" block to the top of the script. Otherwise the event listener will be set after the other code is being executed.
2. Also, I changed the vector properties. The vector points straight up in 3D space now (x = 0, y = 0, z = 1) and there is a small offset (x = 0.3) regarding the origin point of the vector. So that the rotation axis will be shift to the end of the gate rather than being in the center of it.
Now it should work like expected.
Benjamin
2. Attach main part to the hinge.
3. Rearrange the main part by dragging it to the right place.
Result:
In this case it definitely makes more sense doing it that way and it's more logical instead of using the "turn" block using vectors which can be confusing. Also, using the attach feature you can implement complex mechanisms just using simple Blockly.
Benjamin
Great lesson. You can bet I'll use the hinge; gates, trap doors, draw bridges, custom doors and windows. Can you see multiple hinges and panels be used to create an undulating surface like a waterfall? Logic gates? A lifting device a'la Archimedes screw?
I didn't know attachment points could be moved. That will ease assemby of complex models.
-Tom