binding

Get help using Construct 2

Post » Mon Mar 20, 2017 6:31 am

Message: arlidar can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hello everybody. Help please understand. How can I do this, with using what,
such a binding of the character to the cursor or to the finger. Soft, not sharp binding.

https://youtu.be/XTg-Uy5EKS8
B
2
Posts: 5
Reputation: 160

Post » Mon Mar 20, 2017 7:13 am

You can do this one of two ways.

First is giving the character a drag-and-drop behavior.
Second is by using LERP.

Createa Global Var: BIND_SPD = 0.2
On is touching screen | set character X to lerp(character.x, touch.x, BIND_SPD)
On is touching character. | set character y to lerp(character.y, touch.y, BIND_SPD)

0.2 is a good scroll speed but adjust it with ranges 0.05-0.9 and see what works best for you.
Image Image Image
B
31
S
11
G
27
Posts: 748
Reputation: 17,093

Post » Mon Mar 20, 2017 7:50 am

Hi. Thank you very much for your help. I will try.
B
2
Posts: 5
Reputation: 160

Post » Mon Mar 20, 2017 12:03 pm

Message: arlidar can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Yes, Second is by using LERP it worked, it's wonderful what I need!

When you click, the character tends to approach the cursor. Is it possible to make a character that does not stick to the cursor.
I mean, for example, the character is in the center of the screen, if you click in the corner of the screen, the character will approach the cursor. Is it possible to make sure that the character remains in place, but at the same time it was controlled by the cursor.

https://youtu.be/zvlLTsCBkaE
B
2
Posts: 5
Reputation: 160


Return to How do I....?

Who is online

Users browsing this forum: matriax, Resslx and 30 guests