the coordinates of point
CodePudding user response:
The floor alone to a layer, Raycast layer and only the collisionCodePudding user response:
Math library is not a ray and plane intersection algorithm,CodePudding user response:
Vector3 hitposition=[the coordinates of the point on the screen]Ray mouseRay=camera. ScreenPointToRay (hitposition);
RaycastHit hit;
If (Physics. Raycast (mouseRay, out hit))
{
If (hit) starts. GameObject. Name=="terrain name")
{
Vector3 des=hit. Point;//and the intersection of terrain
}
}