Rex's plugins for Construct2
  • Home
  • Map
  • Tutorial/Templates
  • News
  • About

rex_touchdirection2

Plugin, ACE table, Discussion thread
Dependence: rex_touchwrap plugin

Introduction
Move object with mouse or touch dragging.

Usage
Sample capx
Prepare
Remember put rex_touchwrap plugin into project.
Proportion
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".
Axis
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.

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.

Create a free web site with Weebly
  • Home
  • Map
  • Tutorial/Templates
  • News
  • About