I need your advice, guys. My spaceship has a turret, I use Raycast from Camera to target this turret. If I’m looking at gameobject, turret is faced well, but if I look at empty space, turret is not facing well because it is not getting correct Vector3, of course. So what is it better solution for it, I should say that turret should be faced to really long range target?
If you are not looking at anything, get a point some distance away on the ray and have the turret look at that point. This is the same as figuring out where the ray intersects a sphere surrounding your camera.