Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: PolyMad on September 07, 2021, 06:18:31 AM

Title: How to calculate the average position between 3 vectors?
Post by: PolyMad on September 07, 2021, 06:18:31 AM
I want to calculate the average position between 3 vectors, how can I do that?
There's no ready function from what I see, and creating an array and extracting X, Y, Z for each and averaging is quite cumbersome... is this the only way?
Title: Re: How to calculate the average position between 3 vectors?
Post by: ch1ky3n on September 07, 2021, 06:41:25 AM
Hey, you can use vector 3 operator

add a,b = ab
add ab+c = d
divide d /3

alternatively, you can use Array List Get Average Value after dropping all the vector 3
Title: Re: How to calculate the average position between 3 vectors?
Post by: PolyMad on September 07, 2021, 08:14:29 AM
Thank you, I solved by averaging 2 per time, using interpolation with 0 time!