I’m trying to understand the math involved in adding and multiplying vector data.
ADDING 2 VECTORS:
If I add 2 vectors
(2,3,1) + (1,1,4) ,
Will that give me
(3,4,5)
?
Does it add them together?
MULTIPLYING AGAINST A FLOAT
If I multiply a vector (2,3,4) * 3.5 , is it multiplying all 3 numbers against the float individually to give me (7,10.5, 14)?
Again, just trying to understand what’s going on under the hood a little better.
Yes it is. Addition creates a new vector out of all the vectors you are adding. Multiplication extends the vector if the scalar is greater than 1 and reduces it if smaller than 1. At 0, you have a vector zero, less than 0 you invert the direction of the vector. Dividing is the same process. http://docs.unity3d.com/Documentation/Manual/UnderstandingVectorArithmetic.html
– fafaseYes, it is not even an option anymore that I see.
– sniper02311Yes,
– michaelchambers.activeis deprecated and replaced with.activeInHierarchy[https://docs.unity3d.com/2020.1/Documentation/ScriptReference/GameObject-activeInHierarchy.html][1] [1]: https://docs.unity3d.com/2020.1/Documentation/ScriptReference/GameObject-activeInHierarchy.html