Spinning Two Overlaid Gears in 2d
I want to rotate two gears at the same time in my 2D project. One gear rotates clockwise and the other gear rotates counter-clockwise. Gear1 is assigned to the default layer. Gear2 is assigned to a created layer. Both gears are centered at position 0,0,0.
When I run the animation Gear1 rotates clockwise as expected and is sensitive to increased or decreased X values placed in: transform.Rotate(Vector3.back times X); Gear2 rotates counter clockwise as expected but at a very slow rate compared to Gear1. Changing the X value in transform.Rotate(Vector3.forward times X); has no impact on rotation speed.
Thanks in advance for you guidance
Gear1 script is as follows: using UnityEngine; public class R1 : MonoBehaviour { void Update() { // Rotate the object around its local X axis at 1 degree per second transform.Rotate(Vector3.back * 5); } }
Gear2 script is as follows: using UnityEngine; public class R2 : MonoBehaviour { void Update() { // Rotate the object around its local X axis at 1 degree per second transform.Rotate(Vector3.forward * 5); } }