hi
i trying to resolve problem how to scale game object. i have gameobject and im instantiating 4 arrows at the sides of gameobject to scale in direction showed by arrow. there is no problem when game object has no rotation (rotation 0,0,0). because gameobject can change rotation only around y, so scaling is only in plane xz and i only changing position of arrow in axis x or z. but when i rotate object in some angle i need to calculate for example y coordinate from actual x coordinate and actual rotation of object. so the arrow will follow actual angle of object. i tryed sin and cosine function but this not work properly
y = x / (Mathf.Sin(object.transform.eulerAngles.y * Mathf.Deg2Rad) * Mathf.Cos(object.transform.eulerAngles.y * Mathf.Deg2Rad));
is there any other way to calculate it?
