How does the unity rotate tool rotate around the local y axis? It seems that if I try to adjust localEulerAngles.y programmatically, we do not get the same effect. When rotating with the local rotate tool, x, y and z values are changed.
How can we rotate a transform around its local y axis?
the space parameter is what you need:
transform.Rotate(0, yAmount, 0, Space.Self);
transform.RotateAround(transform.position, transform.up, Time.deltaTime * 90f);
Try this:
void Update()
{
transformRotateAround(transform.position, TransformDirection(Vector3.up), Time.deltaTime * 90f);
}
private void Update()
{
transform.Rotate(0, 0, 10 * Time.deltaTime);
}