# Cursor3D.cs

This script drives the 3D Cursor prefab.

With this script, you an use the cursor to point at and select objects.

The script uses depth maps to determine location. As a result, objects with Fade and Transparent materials will not be able to be selected.

To ensure an object isn't picked up by the 3D cursor, set its layer to "Ignore Raycast.”

## Fields & Properties

### **bool disableSystemCursor**

Disables the OS cursor at the start.

### **bool relativeScale**

Should the cursor scale follow the size of the LookingGlass.

### **GameObject cursorGameObject**

Game Object for the 3D Cursor.

### **bool uiCursorMode**

When true, renders the cursor from `uiCursor` on a 2D canvas.

## Methods

### **Vector3 GetWorldPos()**

Returns the location of the 3D cursor (in world space).

### **Vector3 GetLocalPos()**

Returns the location of the 3D cursor (in the Hologram Camera space).

### **Vector3 GetNormal()**

Returns the direction of the normal at the given point.

### **Quaternion GetRotation()**

Returns the rotation of the 3d Cursor (in world space).

### **Quaternion GetLocalRotation()**

Returns the rotation of the 3D Cursor (relative to the Hologram Camera’s space).

### **bool GetOverObject()**

Returns true if cursor is over an object.

### **void Refocused()**

Reenable system cursor.  Useful for activating from an external script when a user needs to see their cursor.

### **GameObject uiCursor**

Game Object for the 2D Cursor.
