I’ve not tested it myself but perhaps try changing your vector along the z axis to Camera.main.transform.forward instead. That should use whichever direction you camera is facing including the sky!
What is happening depends on what your script is attached to (because “transform” refers to the parent/GameObject containing the script)
Is this script attached to the Camera? Or is it attached to the cylinder?
If script is attached to camera, I believe your rigidbody instantiation would automatically match your camera view and might work okay as written. (I’d have to test it out)
But if the script is attached to another object, you will need to make a call to Camera’s forward vector as mentioned above…