Creating a raycast for turret

I am trying to figure out how to create a raycast that causes my turret to turn to face a target. I am creating this for a space ship so I am not sure how I go about making sure that it detects a metor or ship that goes though.

Any Help Please.


Your post (as it appears now) isn’t something we can give you a quick answer for, and isn’t really appropriate for UnityAnswers. The UnityAnswers philosophy is:

“[Unity Answers] is a place to ask specific questions that have specific answers. The forum is a better place to post discussions and non-technical questions.”

It sounds like what you’re looking for is Unity training, rather than a specific answer. I would suggest visiting the following training websites to find the one that best helps you move forward. In addition to the sites below, you can always search YouTube, which has a large number of user-created Unity tutorials.