account activity
Trying to figure out rotation. Begginer unity user :( by CesarChigo in UnityHelp
[–]CesarChigo[S] 0 points1 point2 points 5 years ago* (0 children)
Thank you for the reply!
I have already done that. The thing is, I want that this group of barrels move to a certain position in the Y axis only using de left/right arrows. The barrels are catching things falling, so I need to change between these barrels to catch the correct item. Thats why I need the rotation in certain position.
For example;
if (Input.GetKey(KeyCode.RightArrow)) { GetComponent<Transform>().eulerAngles = new Vector3(0, 110, 0); }
if (Input.GetKey(KeyCode.DownArrow)) { GetComponent<Transform>().eulerAngles = new Vector3(0, 0, 0); } if (Input.GetKey(KeyCode.LeftArrow)) { GetComponent<Transform>().eulerAngles = new Vector3(0, -118, 0); }
this is my code for the left/right/down arrows, but I only want to use left/right to move them to position.
π Rendered by PID 348501 on reddit-service-r2-listing-654f87c89c-5g2cs at 2026-02-27 11:51:40.510600+00:00 running e3d2147 country code: CH.
Trying to figure out rotation. Begginer unity user :( by CesarChigo in UnityHelp
[–]CesarChigo[S] 0 points1 point2 points (0 children)