You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
my intuition of it is given an angle, say DoTransform(30degs), it will output Transformed(Vector2( cos(30degToRad), sin(30degToRad) ))
after wired things up, i discover it isn't. so the code says:
there is an internal 'currentAngle', we'll increment it by the input angle every time we call transform,
the direction is normalized by 1f / Mathf.Max(Mathf.Abs(Direction.x), Mathf.Abs(Direction.y));
so i guess it is made this way because of input axis prefab needed this kind of manipulation,
but comparing this component among others, it shouldn't have incremented a hidden angle,
some components that provides increment feature would have both Set() and Increment()
also the special normalization would better be another component's duty
The text was updated successfully, but these errors were encountered:
my intuition of it is given an angle, say DoTransform(30degs), it will output Transformed(Vector2( cos(30degToRad), sin(30degToRad) ))
after wired things up, i discover it isn't. so the code says:
so i guess it is made this way because of input axis prefab needed this kind of manipulation,
but comparing this component among others, it shouldn't have incremented a hidden angle,
some components that provides increment feature would have both Set() and Increment()
also the special normalization would better be another component's duty
The text was updated successfully, but these errors were encountered: