reckfellENGINE

InputEventScreenDrag

Represents a screen drag event.

On this page
class InputEventScreenDragReckfellSharpInherits InputEventFromWindow

Represents a screen drag event.

Stores information about screen drag events. See Entity._Input.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

InputEventScreenDragConstructor
# InputEventScreenDrag
C#
public InputEventScreenDrag();

Properties9

IndexProperty
# Index
C#
public int Index { get; set; }

The drag event index in the case of a multi-drag event.

PenInvertedProperty
# PenInverted
C#
public bool PenInverted { get; set; }

Returns true when using the eraser end of a stylus pen.

PositionProperty
# Position
C#
public Vector2 Position { get; set; }

The drag position in the viewport the node is in, using the coordinate system of this viewport.

PressureProperty
# Pressure
C#
public float Pressure { get; set; }

Represents the pressure the user puts on the pen. Ranges from 0.0 to 1.0.

RelativeProperty
# Relative
C#
public Vector2 Relative { get; set; }

The drag position relative to the previous position (position at the last frame). Note: InputEventScreenDrag.Relative is automatically scaled according to the content scale factor, which is defined by the project's stretch mode settings. This means touch sensitivity will appear different depending on resolution when using InputEventScreenDrag.Relative in a script that handles touch aiming. To avoid this, use InputEventScreenDrag.ScreenRelative instead.

ScreenRelativeProperty
# ScreenRelative
C#
public Vector2 ScreenRelative { get; set; }

The unscaled drag position relative to the previous position in screen coordinates (position at the last frame). This position is not scaled according to the content scale factor or calls to InputEvent.XformedBy. This should be preferred over InputEventScreenDrag.Relative for touch aiming regardless of the project's stretch mode.

ScreenVelocityProperty
# ScreenVelocity
C#
public Vector2 ScreenVelocity { get; set; }

The unscaled drag velocity in pixels per second in screen coordinates. This velocity is not scaled according to the content scale factor or calls to InputEvent.XformedBy. This should be preferred over InputEventScreenDrag.Velocity for touch aiming regardless of the project's stretch mode.

TiltProperty
# Tilt
C#
public Vector2 Tilt { get; set; }

Represents the angles of tilt of the pen. Positive X-coordinate value indicates a tilt to the right. Positive Y-coordinate value indicates a tilt toward the user. Ranges from -1.0 to 1.0 for both axes.

VelocityProperty
# Velocity
C#
public Vector2 Velocity { get; set; }

The drag velocity. Note: InputEventScreenDrag.Velocity is automatically scaled according to the content scale factor, which is defined by the project's stretch mode settings. This means touch sensitivity will appear different depending on resolution when using InputEventScreenDrag.Velocity in a script that handles touch aiming. To avoid this, use InputEventScreenDrag.ScreenVelocity instead.

Methods18

GetIndexint
# GetIndex
C#
public int GetIndex();
Returns int
GetPenInvertedbool
# GetPenInverted
C#
public bool GetPenInverted();
Returns bool
GetPositionVector2
# GetPosition
C#
public Vector2 GetPosition();
Returns Vector2
GetPressurefloat
# GetPressure
C#
public float GetPressure();
Returns float
GetRelativeVector2
# GetRelative
C#
public Vector2 GetRelative();
Returns Vector2
GetScreenRelativeVector2
# GetScreenRelative
C#
public Vector2 GetScreenRelative();
Returns Vector2
GetScreenVelocityVector2
# GetScreenVelocity
C#
public Vector2 GetScreenVelocity();
Returns Vector2
GetTiltVector2
# GetTilt
C#
public Vector2 GetTilt();
Returns Vector2
GetVelocityVector2
# GetVelocity
C#
public Vector2 GetVelocity();
Returns Vector2
SetIndexvoid
# SetIndex
C#
public void SetIndex(int index);
Parameters
NameTypeDefault
indexint—
SetPenInvertedvoid
# SetPenInverted
C#
public void SetPenInverted(bool penInverted);
Parameters
NameTypeDefault
penInvertedbool—
SetPositionvoid
# SetPosition
C#
public void SetPosition(Vector2 position);
Parameters
NameTypeDefault
positionVector2—
SetPressurevoid
# SetPressure
C#
public void SetPressure(float pressure);
Parameters
NameTypeDefault
pressurefloat—
SetRelativevoid
# SetRelative
C#
public void SetRelative(Vector2 relative);
Parameters
NameTypeDefault
relativeVector2—
SetScreenRelativevoid
# SetScreenRelative
C#
public void SetScreenRelative(Vector2 relative);
Parameters
NameTypeDefault
relativeVector2—
SetScreenVelocityvoid
# SetScreenVelocity
C#
public void SetScreenVelocity(Vector2 velocity);
Parameters
NameTypeDefault
velocityVector2—
SetTiltvoid
# SetTilt
C#
public void SetTilt(Vector2 tilt);
Parameters
NameTypeDefault
tiltVector2—
SetVelocityvoid
# SetVelocity
C#
public void SetVelocity(Vector2 velocity);
Parameters
NameTypeDefault
velocityVector2—
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.