In this lesson we'll once again take a look at Raycasts by using them to apply force to an object. We'll simulate a bullet impact hitting an object by applying force to a sphere when the Raycast is in contact.
Login with your CG Cookie Citizen Account to ask a question.
Is this what I would use if I wanted 'open' text to appear when a player was close to and looking at a container? Or is there a more commonly used choice for that, something like a mouse over if you were working in 2d?
I am slightly confused with the Raycast length and Hit. In my demo the Sphere is always hit when pressing the trigger. ...
I am slightly confused with the Raycast length and Hit. In my demo the Sphere is always hit when pressing the trigger. No matter how short I make the Ray Length. I have reviewed and copied the script from this lesson. I was under the impression that if would only register a hit if the Raycast touched the object (hit).