rex_touchdirection2
Introduction
Move object with mouse or touch dragging.
Move object with mouse or touch dragging.
Proportion
The object will be moved followed with dragging, the moving distance will be
The object will be moved followed with dragging, the moving distance will be
dragging distance * proportion
The object will be moved to opposite if "Proportion" set to (-1). "Proportion" set to 0.5 will affect the moving distance of this object to be half of dragging distance.
"Proportion" could be set at properties table, or set by "Action:Set proportion".
"Proportion" could be set at properties table, or set by "Action:Set proportion".
Axis
The moving direction could be locked to "Horizontal", "Vertical", "Horizontal or vertical", or "Both" by set "Axis" in properties table.
The moving direction could be locked to "Horizontal", "Vertical", "Horizontal or vertical", or "Both" by set "Axis" in properties table.
Dragging events
"Condition:On dragging start", and "Condition:On dragging stop" will be triggered when touch start and touch end.
"Condition:On dragging start", and "Condition:On dragging stop" will be triggered when touch start and touch end.
Drag the background
Sample capx
This behavior could co-work with official scroll to behavior to drag the background.
Add official scroll to behavior and this behavior into a camera sprite, and set "Proportion" to (-1) . So that this camera sprite will be moved to the opposite side of dragging direction.
Sample capx
This behavior could co-work with official scroll to behavior to drag the background.
Add official scroll to behavior and this behavior into a camera sprite, and set "Proportion" to (-1) . So that this camera sprite will be moved to the opposite side of dragging direction.