I have to randomize vector3 between -variable and variable in X and Y axis. So Z axis is forward and I need find random vector3 in a circle around that vector, but that all in local space. Creating vector3 and adding it to local space is a bad idea.
Player can walk and rotate around Y axis and his face can move around X axis.
is this what you want?
var cam = Camera.main;
var distance = 1000f;
var tolerance = 1f;
var offset = cam.transform.forward * distance;
var direction = (offset + new Vector3(Random.Range(0f, tolerance), Random.Range(0f, tolerance), 0f)).normalized;
var lineOfSight = new Ray(cam.transform.position, direction);