[Behavior] moveto

Post your completed addons to share with the community

Post » Mon Sep 26, 2011 11:35 am

MoveTo (Update: 2013/05/02)
touch wrap
cursor2
drag&drop2
PushOutSolid


[plugin] TouchWrap. The different between touchwrap and official touch plugin are
-Touchwrap will keep tracing position of cursor when mouse moving even if mouse click is not down.
- Touchwrap will keep the lastest touch or cursor position when touch end or mouse click up.
Last edited by rexrainbow on Thu Jul 17, 2014 4:02 am, edited 3 times in total.
B
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

Post » Tue Sep 27, 2011 12:38 am

plugin -- touchmouse

In pc, mouse plugin can be used, but touch can not. In pad, touch plugin can be used, but mouse can not.
If you want to make a game running on pc and pad, you may create double events for both mouse and touch.

Here is a mouse plugin extension that merging touch events from original touch plugin.

The events mapping list below.

mouse: On click: Left/Middle/Right + Clicked/Double-clicked
= touch:On touch start (touch has no key mapped from Left/Middle/Right)

mouse: On any click
= touch: On touch start

mouse: Mouse button is down: Left/Middle/Right
= touch: Is in touch

mouse: On button released: Left/Middle/Right
= touch: On touch end

mouse: On object clicked: Left/Middle/Right + Clicked/Double-clicked
= touch: On touched object

mouse: Cursor is over object
= touch: Is touching object


Using touchmouse plugin for supporting mouse and touch at a single event.rexrainbow2011-10-28 04:32:42
B
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

Post » Tue Sep 27, 2011 3:19 pm

Thanks! I have tried them all and works perfectly. They are an amazing timesaver.
B
33
S
4
G
5
Posts: 9
Reputation: 5,535

Post » Tue Sep 27, 2011 10:16 pm

Yes, thanks for contributing. These will come in handy some day.
B
18
S
8
G
7
Posts: 120
Reputation: 5,630

Post » Tue Oct 04, 2011 4:16 am

Update:

Set instance's position related to layer. Before is using absolute position which may be wrong when scrolling layer.

Sorry, my mistake.rexrainbow2011-10-04 05:05:40
B
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

Post » Tue Oct 04, 2011 5:03 am

Sorry again, I update cursor again.

Drag & drop has the same problem with cursor.
Now I use position related layer like in cursor plugin.rexrainbow2012-01-10 08:05:25
B
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

Post » Tue Oct 04, 2011 8:41 am

Thanks for these plugins..
B
40
S
14
G
11
Posts: 243
Reputation: 9,432

Post » Wed Oct 05, 2011 5:47 am

Behavior plugin -- MoveTo (download)

Moving the sprite to the target position straightly from current position.
To assign target position, use action:Set target position.

You can assign acceleration or deceleration if need.rexrainbow2011-10-05 06:18:42
B
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

Post » Wed Oct 05, 2011 10:48 am

awesome! A fantastic contribution.
B
12
S
5
G
5
Posts: 80
Reputation: 3,572

Post » Thu Oct 06, 2011 3:10 pm

Update of moveto behavior:

- keep current speed on action:"Set target position" (in previous version, current speed will be set to 0 if acc!=0)
- add action:"Set Current speed". If you still like to start moving at speed=0(or something else), use it.


Special thanks to gonzdevour.rexrainbow2013-03-06 03:00:14
B
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

Next

Return to Completed Addons

Who is online

Users browsing this forum: DragoMej and 4 guests