reckfellENGINE

InputEventMouseMotion

Mouse or pen motion data: displacement, velocity and pen fields.

On this page
class InputEventMouseMotionReckfellSharpInherits InputEventMouse

A motion event contains distinct quantities. Position is a point in the recipient's space, Relative is per-event displacement and Velocity is velocity per second. XformedBy preserves ScreenRelative and ScreenVelocity while transforming Relative and Velocity by the basis. Do not multiply an already measured displacement by delta again.

Input accumulation can combine multiple motions: do not treat one callback as one hardware measurement. Disabling Input.UseAccumulatedInput changes accumulation but does not guarantee a fixed device reporting rate or precision.

Pressure, Tilt and PenInverted depend on device data. They can be assigned manually; Pressure and Tilt setters do not clamp their ranges. Testing a synthetic event does not establish tablet support on a particular platform.

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

Constructors1

InputEventMouseMotionConstructor
# InputEventMouseMotion
C#
public InputEventMouseMotion();

Creates a motion event with zero Relative, ScreenRelative, Velocity, ScreenVelocity, Tilt and Pressure; PenInverted = false. Does not sample the mouse or move the pointer.

Properties7

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

Flag for the inverted/eraser end when supplied by the device and driver. A manually assigned true is only event data, not proof that a pen or eraser exists.

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

Pen pressure, normally normalized by the device to 0..1. The setter stores the number without clamping: a synthetic 1.5 remains 1.5. Validate your own data; zero alone does not identify the device type.

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

Mouse displacement for the event. Event transformation can scale it: scale 2 changed (3, 4) into (6, 8) in the check. This is displacement, not velocity or an absolute point.

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

Screen mouse displacement preserved by event transformation. It stayed (3, 4) when Relative became (6, 8) in the check. Useful for look sensitivity without applying viewport scaling again.

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

Screen velocity preserved by event transformation. Distinct from ScreenRelative: velocity and per-event displacement require different time handling.

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

Pen tilt vector; expected device data ranges from -1 to 1 per axis. The setter neither normalizes nor clamps components; synthetic out-of-range values are retained. A zero vector alone does not establish hardware tilt support.

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

Motion velocity in pixels per second in the event's transformed space. XformedBy applies the transform basis without translation; ScreenVelocity is stored separately. This is not per-event displacement: for direct motion-driven rotation use Relative or ScreenRelative without multiplying by delta again.

Methods14

GetPenInvertedbool
# GetPenInverted
C#
public bool GetPenInverted();

Returns the inverted-pen flag stored in PenInverted. Does not poll the device again.

Returns bool

Current PenInverted value; see the property for units and limits.

GetPressurefloat
# GetPressure
C#
public float GetPressure();

Returns the pen pressure stored in Pressure. Does not poll the device again.

Returns float

Current Pressure value; see the property for units and limits.

GetRelativeVector2
# GetRelative
C#
public Vector2 GetRelative();

Returns the per-event displacement stored in Relative. Does not poll the device again.

Returns Vector2

Current Relative value; see the property for units and limits.

GetScreenRelativeVector2
# GetScreenRelative
C#
public Vector2 GetScreenRelative();

Returns the screen-space per-event displacement stored in ScreenRelative. Does not poll the device again.

Returns Vector2

Current ScreenRelative value; see the property for units and limits.

GetScreenVelocityVector2
# GetScreenVelocity
C#
public Vector2 GetScreenVelocity();

Returns the screen-space velocity in pixels per second stored in ScreenVelocity. Does not poll the device again.

Returns Vector2

Current ScreenVelocity value; see the property for units and limits.

GetTiltVector2
# GetTilt
C#
public Vector2 GetTilt();

Returns the pen tilt vector stored in Tilt. Does not poll the device again.

Returns Vector2

Current Tilt value; see the property for units and limits.

GetVelocityVector2
# GetVelocity
C#
public Vector2 GetVelocity();

Returns the velocity in pixels per second stored in Velocity. Does not poll the device again.

Returns Vector2

Current Velocity value; see the property for units and limits.

SetPenInvertedvoid
# SetPenInverted
C#
public void SetPenInverted(bool penInverted);

Sets PenInverted to the supplied inverted-pen flag using the property rules. Does not generate device movement.

Parameters
NameTypeDefault
penInvertedbool—
penInverted

New PenInverted value in the property's units.

SetPressurevoid
# SetPressure
C#
public void SetPressure(float pressure);

Sets Pressure to the supplied pen pressure using the property rules. Does not generate device movement.

Parameters
NameTypeDefault
pressurefloat—
pressure

New Pressure value in the property's units.

SetRelativevoid
# SetRelative
C#
public void SetRelative(Vector2 relative);

Sets Relative to the supplied per-event displacement using the property rules. Does not generate device movement.

Parameters
NameTypeDefault
relativeVector2—
relative

New Relative value in the property's units.

SetScreenRelativevoid
# SetScreenRelative
C#
public void SetScreenRelative(Vector2 relative);

Sets ScreenRelative to the supplied screen-space per-event displacement using the property rules. Does not generate device movement.

Parameters
NameTypeDefault
relativeVector2—
relative

New ScreenRelative value in the property's units.

SetScreenVelocityvoid
# SetScreenVelocity
C#
public void SetScreenVelocity(Vector2 velocity);

Sets ScreenVelocity to the supplied screen-space velocity in pixels per second using the property rules. Does not generate device movement.

Parameters
NameTypeDefault
velocityVector2—
velocity

New ScreenVelocity value in the property's units.

SetTiltvoid
# SetTilt
C#
public void SetTilt(Vector2 tilt);

Sets Tilt to the supplied pen tilt vector using the property rules. Does not generate device movement.

Parameters
NameTypeDefault
tiltVector2—
tilt

New Tilt value in the property's units.

SetVelocityvoid
# SetVelocity
C#
public void SetVelocity(Vector2 velocity);

Sets Velocity to the supplied velocity in pixels per second using the property rules. Does not generate device movement.

Parameters
NameTypeDefault
velocityVector2—
velocity

New Velocity value in the property's units.

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.