How can I randomize the spawn location(x) of my gameobject while maintaining it’s z distance from the map? Doing a transform.position.z won’t do since the spawner and the map have a rotation.
Vector3 spawnLoc = new Vector3(Random.Range(minX, maxX), transform.position.y, ?????);
Does that mean your map is moving and rotating?
Why not use relative positioning? If your spawned object is set as a child of the map, you won’t need to know the rotation or position of the map. Just the relative position of your object map wise.