- Home /
Question by
pferdefleisch · Feb 10, 2015 at 11:29 AM ·
raycasting
Unity 3D Raycasting not hit Instantiated Gameobjects
The Raycast wont hit the Instatiated Objects(sended from Server) and only hits the terrain object:
i call this every "Update":
Ray ray = Camera.main.ViewportPointToRay (new Vector3(0.5F,0.5F,0F));
RaycastHit hit;
if(collider.Raycast(ray,out hit,100F)){
hitPos = hit.point;
if (hitPos != null)
Debug.DrawLine(ray.origin,hit.point);
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613182913im_/https://answers.unity.com/themes/thub/images/avi.jpg)