[Unity] Physics: I tried “Physics.Raycast” from Camera.

Last time, I tried Raycast by casting Ray from a game object. [Link: Physics: I tried “Physics.Raycast” from Game Object.] This time, I tried another way of Raycast. That is casting Ray from Camera. [Ref: https://docs.unity3d.com/Manual/CameraRays.html]   [Test image to cast Ray from Camera] When clicking a game object which are scattered in 3D space by mouse, the shape and color (object name and tag) are shown.   [Source code... Read more

[Unity] Physics: I tried “Physics.Raycast” from Game Object.

You know, we normally use “Raycast” to identify Game Objects existed in certain direction from one location. The image is like that you emit virtual laser beam from a certain position, then if the beam hit somethings, you’ll get the information of the objects. 2 ways for Raycast The method of this, there are 2 ways like following Cast a Ray from a Game Object To identify the objects which... Read more

[Unity] uGUI: I tried each “Render Mode” of Canvas component.

To create UI, it’s normal to use uGUI which is standard functions of Unity now. UI objects which are put in a scene are rendered by Canvas object. So it’s necessary to use Canvas when you use any UI objects. This time, I tried and compared 3 Render Modes of Canvas component. (Ref: https://docs.unity3d.com/Manual/class-Canvas.html ) 3 Render Modes of Canvas Canvas have 3 Render Modes listed following. Screen Space –... Read more