Move layout with drag and drop

Get help using Construct 2

Post » Sat Mar 03, 2012 12:41 pm

Hi
Im starting in this Construct universe and i have one question.

I have an object which is drag and drop. I have constrained it to the edges. All is working fine except that when i drag it to the right, as there is more layout, the object goes out of wiew.

Then i created an event
system - every tick - system - Scroll to object

Now its fine as i drag my object and the layout moves to follow it and show the background so i can navigate dragging the object.

But the movement is so rude with jumps

Is there a better way to make this trick? The game is something as that one where you try to take out a bone and if you touch the border the nose of the patient sounds and light. I need more precision dragging the object.

Thank you very much for your time and interest.

B
3
Posts: 27
Reputation: 904

Post » Sat Mar 03, 2012 12:44 pm

every tick
system set scrollx to lerp(scrollx,sprite.x,1-0.5^dt)
system set scrolly to lerp(scrolly,sprite.y,1-0.5^dt)
Image Image
B
161
S
48
G
91
Posts: 7,357
Reputation: 67,269

Post » Sat Mar 03, 2012 5:18 pm

Thank you very much.
It works perfect.
I hope to be helpful too shortly.

B
3
Posts: 27
Reputation: 904


Return to How do I....?

Who is online

Users browsing this forum: PixelatedTrip, Yahoo [Bot] and 0 guests