# DragRay class

Namespace: [Grasshopper2.Parameters](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.parameters.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public sealed class DragRay
```

A ray in a viewport used for picking and dragging shapes in 3D.

## Constructors

- [DragRay](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parameters.dragray/ctor.md)

## Properties

- [CPlane](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parameters.dragray/cplane.md): Gets the construction plane of the viewport at the time of pick.
- [CurveRadius](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parameters.dragray/curveradius.md): Gets an acceptable distance (measured in pixels) from a ray to an edge to count as a hit.
- [MaximumParameter](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parameters.dragray/maximumparameter.md): Gets the furthest parameter along the ray where a hit may still be considered.
- [PickMode](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parameters.dragray/pickmode.md): Gets whether the ray is designed to hit sub-objects or only whole objects.
- [PointRadius](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parameters.dragray/pointradius.md): Gets an acceptable distance (measured in pixels) from a ray to a point to count as a hit.
- [Projection](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parameters.dragray/projection.md): Gets the projection from world space into viewport space. This projection eradicates the z-depth, so it can be used directly to measure separation between shapes in the XY plane.
- [Ray](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parameters.dragray/ray.md): Gets the ray. Note that the start point of the ray is meaningful. The line ought not hit any objects behind the start point.

## Methods

- [CreateHitAt](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parameters.dragray/createhitat.md): Create a new hit result along this ray.
- [PixelDistance](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parameters.dragray/pixeldistance.md): Measure the visual separation (in pixels) between two points in the viewport.
