InputEventMouseMotion

Input event type for mouse motion events.

Contains mouse and pen motion information. Supports relative, absolute positions and speed. See Node._input. Note: By default, this event is only emitted once per frame rendered at most. If you need more precise input reporting, call Input.setUseAccumulatedInput with false to make events emitted as often as possible. If you use InputEventMouseMotion to draw lines, consider implementing url=https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithmBresenham's line algorithm/url as well to avoid visible gaps in lines if the user is moving the mouse quickly.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

getPressure
double getPressure()
getRelative
Vector2 getRelative()
getSpeed
Vector2 getSpeed()
getTilt
Vector2 getTilt()
opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(InputEventMouseMotion other)
opEquals
bool opEquals(typeof(null) n)
setPressure
void setPressure(double pressure)
setRelative
void setRelative(Vector2 relative)
setSpeed
void setSpeed(Vector2 speed)
setTilt
void setTilt(Vector2 tilt)
toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

pressure
double pressure [@property getter]
double pressure [@property setter]

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

relative
Vector2 relative [@property getter]
Vector2 relative [@property setter]

The mouse position relative to the previous position (position at the last frame). Note: Since InputEventMouseMotion is only emitted when the mouse moves, the last event won't have a relative position of Vector2(0, 0) when the user stops moving the mouse.

speed
Vector2 speed [@property getter]
Vector2 speed [@property setter]

The mouse speed in pixels per second.

tilt
Vector2 tilt [@property getter]
Vector2 tilt [@property setter]

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.

Static functions

_new
InputEventMouseMotion _new()

Construct a new instance of InputEventMouseMotion. Note: use memnew!InputEventMouseMotion instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta