Topic category: Help with MCreator software
I am trying to make a plugin that finds the distance between 2 points. it doesen't really work. Here is the code
{
"args0": [
{
"type": "input_value",
"name": "aX",
"check": "Number"
},
{
"type": "input_value",
"name": "aY",
"check": "Number"
},
{
"type": "input_value",
"name": "aZ",
"check": "Number"
},
{
"type": "input_value",
"name": "bX",
"check": "Number"
},
{
"type": "input_value",
"name": "bY",
"check": "Number"
},
{
"type": "input_value",
"name": "bZ",
"check": "Number"
}
],
"inputsInline": true,
"output": "Number",
"colour": 60,
"tooltip": "Calculates the distance between two points",
"mcreator": {
"toolbox_id": "custom_procedures",
"inputs": ["aX", "aY", "aZ", "bX", "bY", "bZ"]
},
"code": "Math.sqrt(Math.pow(aX - bX, 2) + Math.pow(aY - bY, 2) + Math.pow(aZ - bZ, 2));"
}