Method PickFace
PickFace(Camera, Vector3, ProBuilderMesh)
Returns the first face on a ProBuilder mesh that collides with the ray cast by ProBuilder, given a specific screen position and camera.
Declaration
public static Face PickFace(Camera camera, Vector3 mousePosition, ProBuilderMesh pickable)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | The camera to use when calculating the raycast. |
Vector3 | mousePosition | The screen position to use when calculating the raycast. |
ProBuilderMesh | pickable | The ProBuilderMesh to test for the ray/face intersection. |
Returns
Type | Description |
---|---|
Face | The intersected face if successful; null if the ray failed to hit a face. |