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

rex_dragscale

Plugin, ACE table, Discussion thread
Dependence: rex_touchwrap plugin

Introduction
Set size or get scaling from two dragging points.
This behavior could not be used on pc since there is only one touch point (mouse).

Usage
Sample capx
Prepare
Remember to put rex_touchwrap plugin into project.
Detecting two dragging points
While two dragging points detected, "Condition:On dragging start" will be triggered, and "Condition:Is dragging" will return true.
User could get these two dragging points by ("Expression:P0X", "Expression:P0Y"), and ("Expression:P1X", "Expression:P1Y").
"Condition:On dragging moving start", or "Condition:On dragging moving" will be triggered while dragging and moving.
Scale
User could get scale by "Expression:Scale"_. The calculation of this expression is
(length between two current dragging points) / (length between two initial dragging points)
Set "Auto scale" to "No" at properties table if user does not want change the size of object.

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