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

Public Member Functions

 HeldObjectData (DragBase _dragBase)
 
void AttemptRelease (bool force)
 Attempts to release the object More...
 
void Drag (Vector3 deltaCamera, Vector2 deltaInput, Vector2 inputPosition)
 Drags the held object More...
 

Properties

DragBase DragObject [get]
 
Vector3 DragForce [get]
 
bool IgnoreDragState [get, set]
 
bool IgnoreBuiltInDragInput [get, set]
 
int TouchIndex [get, set]
 

Detailed Description

A data container class for information about how a draggable object is currently held

Constructor & Destructor Documentation

◆ HeldObjectData()

AC.HeldObjectData.HeldObjectData ( DragBase  _dragBase)

<summaryThe default constructor

Parameters
_dragBaseThe object to drag

Member Function Documentation

◆ AttemptRelease()

void AC.HeldObjectData.AttemptRelease ( bool  force)

Attempts to release the object

Parameters
forceIf True, the object will be released for certain. Otherwise, it will only be released if natural conditions mean it should be.

◆ Drag()

void AC.HeldObjectData.Drag ( Vector3  deltaCamera,
Vector2  deltaInput,
Vector2  inputPosition 
)

Drags the held object

Parameters
deltaCameraThe change in camera position since the last frame
deltaInputThe change in input position since the last frame, in screen-space
inputPositionThe input position this frame, in screen-space

Property Documentation

◆ DragForce

Vector3 AC.HeldObjectData.DragForce
get

The current force being applied to the object

◆ DragObject

DragBase AC.HeldObjectData.DragObject
get

The object being dragged

◆ IgnoreBuiltInDragInput

bool AC.HeldObjectData.IgnoreBuiltInDragInput
getset

If True, the object will not be moved by AC's built-in calls to the Drag function, allowing values to be set manually

◆ IgnoreDragState

bool AC.HeldObjectData.IgnoreDragState
getset

If True, the object will not be released when the input or touch is released

◆ TouchIndex

int AC.HeldObjectData.TouchIndex
getset

The touch index to start dragging with, if on a touch-screen