+3 votes

Hi. How would you go about finding a middle point amid a group of nodes in 3D. Kind of like a half-way point between 2 nodes but with multiple nodes?

in Engine by (462 points)

1 Answer

+3 votes

You can just take the average of the position of all the nodes. For example if your 3 nodes are located at (0,2,1), (1,0,2), (-1,1,0) the middle point would be ((0+1-1)/3, (2+0+1)/3, (-1+1+0)/3)=(0,1,0) Hope this answered your question.

by (446 points)

this is more or less what I had in mind... I'll give it a try, thanks!

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.