I am trying to find the approximate center of my 3d PShape.
I think to find said vertex, I'd need to average all the x coordinates, average all the y coordinates, and average all the z coordinates to get the center x y z.
How would I write a for loop that does this?
Comments
Always post your code when you have a discussion in Programming Questions
I made an example of how to find the average x position below (using PVectors), the code would just be repeated for y and z. Even if you are not using PVectors you should be able to use the same idea