How to get the localEulerAngle Transform.Right that is being set from a world rotation without setting it to a transform.

Basically I’m trying to get the LocalEulerAngle of the base.transform.right position that is being set by the lookAtPos. I want to get this value without the need to set the value to the transform. This way I can do some detection on the LocalEulerAngle before setting it to the transform.

 Vector3 lookAtPos = (target.transform.position - base.transform. position).normalized;
        
         base.transform.right = lookAtPos;

Not sure exactly what you mean… if you want to make your transform.right face the lookAtPos, you could do something like this:

using UnityEngine;

public class lookatTest : MonoBehaviour {
    public Transform lookat;
	void Update () {
        Quaternion lookAtRot = Quaternion.LookRotation(lookat.position-transform.position);
        Quaternion lookRight = Quaternion.LookRotation(-Vector3.right);
        Quaternion finalRot = lookAtRot * lookRight;
        Debug.Log("finalRotEulers:" + finalRot.eulerAngles);
        transform.rotation = finalRot;    //sounds like you DONT want to do this, for some reason

    }
}