Adventure Creator  1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
AC.WorldSpaceCursorExample Class Reference
Inheritance diagram for AC.WorldSpaceCursorExample:

Public Attributes

LayerMask collisionLayer
 
float minDistance = 1f
 
float maxDistance = 30f
 
bool useACCursor = false
 

Detailed Description

This script serves as an example of how you can override AC's input system to allow an object's position in world space to dictate the cursor position. To use it, add it to a mesh object you wish to act as the cursor, and place it on the 'Ignore Raycast' layer.

The mesh object will be controlled by the mouse, but will move in 3D space.

If you wish to instead move the mesh object by an other means (for example, by use of a VR-wand), you can duplicated this script and amend it to suit your needs.

Member Data Documentation

◆ collisionLayer

LayerMask AC.WorldSpaceCursorExample.collisionLayer

The layers that the cursor will collide with.

◆ maxDistance

float AC.WorldSpaceCursorExample.maxDistance = 30f

The maximum distance that the cursor can be from the camera

◆ minDistance

float AC.WorldSpaceCursorExample.minDistance = 1f

The minimum distance that the cursor can be to the camera

◆ useACCursor

bool AC.WorldSpaceCursorExample.useACCursor = false

If True, the AC cursor position will be used instead of the raw mouse position