Raycast into GUI?http://forum.unity3d.com/threads/raycast-into-gui.263397/ << ; Ray myray = UICamera.currentCamera.ScreenPointToRay(Input.mousePosition); RaycastHit[] hits = Physics.RaycastAll(myray, 1000.0f, layer); << ;//NGUI layer, TODO mod
I know how to make the raycast ignore a layer but I want it to ignore layers 9 and 10 but collide with the rest of the layers. I would do it the other way round: declare the variable private and use the SerializeField attribute. This way you can edit
Class Variables类变量 gravity The gravity applied to all rigid bodies in the scene.场景中应用到所有刚性物体的重力. minPenetrationForPenalty The minimum contact penetration value in order to apply a penalty force (default 0.05). Must be positive.两个物体接触碰撞时,物体间最小渗透(穿透)深度