Consider the case where you want to point an object in a 3D scene towards another object and the "eye" object has a scale (either its own or inherited from a parent). It seems to me that the targetTo operation should effectively only change the orientation of that object's matrix, without affecting either the translation or scale.
Is this a reasonable assumption? I could see where this might get complicated if the scale is non-uniform.
targetTo sets the scaling back to [1, 1, 1] even if there is already a scaling factor in the source matrix.
Consider the case where you want to point an object in a 3D scene towards another object and the "eye" object has a scale (either its own or inherited from a parent). It seems to me that the
targetTo
operation should effectively only change the orientation of that object's matrix, without affecting either the translation or scale.Is this a reasonable assumption? I could see where this might get complicated if the scale is non-uniform.
targetTo
sets the scaling back to [1, 1, 1] even if there is already a scaling factor in the source matrix.Sample code:
Live test here: https://runkit.com/bchirlsbiodigital/62bb0ec0ff1ecd0008afb295