#Dominate Vector
1 messages · Page 1 of 1 (latest)
Not sure what you are wanting. Either normalise the vector, or use vector create and set to 0,1,0
Basically what ever vector its closest to (whether that being 1, 0, 0 or 0, 1, 0 or 0, 0, 1 ) it will "round" to the the closest vector so if it's pointing up but slightly tilted tot he right, I want it to just round to 0, 1, 0
Hmm that's quite interesting.
Will it work if you take the highest number and set to that as 1, and 0 for others
i dont belive normalise does that either
I don't quite think I know what your are trying to ask....
Take the biggest number in the vector and set to 1. Take everything else and set to 0.
5,9,8 => 0,1,0
Not 100% sure if it will work so lmk
ive asked chat gpt (yes ik not a great source) but it game me the answer in python, so if you understand that I could send it over
ok ill try that
wait hwo would I even do that?
@tribal wigeon @flat steppe
I've done this before, its not an elegant method but its the one I used for aligning a cube in my puzzle game to the "nearest" vector
Dot all vectors by your direction, put the values into List<Float>, and get the highest using List Max, get the index of the highest with List Get First Index Of, and then get the vector with that index by putting the input vectors into a list aswell
You could optimize this will a loop which would support an infinite amount of vectors for the same number of chips (This is the elegant method)
waht. I understand like none of this,
i dont even know what to point out that I don't understand
i think Ill try this before I try the "not elegant" method
IT WORKED