Let’s say I have 2 cubes.
They can be placed anywhere in the scene.
When I run the script I want to create 2 more cubes inbetween these 2 cubes.
Here is a picture to demonstrate the idea. The red strokes is where the new cubes should be placed.
My idea was to create a linear curve between the two cubes and then get the distance of the curve and place cubes at 1/3rd and 2/3rd of the distance. Is it possible to calculate a curves distance and then somehow get the point in world space?
Depending on what you’re doing, you could also achieve this with point constraints weighted 2:1 and 1:2 to the original cubes – that would let you adjust the positions live and get updates.
I think it would be like this, but I have no idea if this is a good idea. It strikes me as probably not a good idea.
Each joint has point constraint weights to the 2 cubes like (4,1) (3,2) (2,3) (1,4).
If you don’t want it to stay live, you can do a little script that creates a constraint with the proper weights and then deletes it immediately, leaving the joint in the right place…