How do I Make and object move it back into it's place

Get help using Construct 2

Post » Thu Jul 30, 2015 9:57 pm

I was trying to make a drag & drop object move back into it's original place (not just apper there) once is released.
B
11
S
2
G
2
Posts: 14
Reputation: 1,185

Post » Thu Jul 30, 2015 10:42 pm

You could use lerp in set position.
Object set position to: lerp(self.x, target.x, speed you want it to move 0-1), lerp(self.y, target.y, speed you want it to move 0-1)
It helps me move things smoothly from self to target.
B
5
S
1
Posts: 23
Reputation: 426

Post » Thu Jul 30, 2015 10:47 pm

ImageImage
B
105
S
46
G
23
Posts: 778
Reputation: 22,226

Post » Thu Jul 30, 2015 11:21 pm

Thanks guys, worked great!
Is there any book or manual about this kind of expressions?

I never heard about lerp.
B
11
S
2
G
2
Posts: 14
Reputation: 1,185

Post » Thu Jul 30, 2015 11:32 pm

Image Image
B
22
S
13
G
135
Posts: 871
Reputation: 70,320

Post » Thu Jul 30, 2015 11:36 pm

Thanks MadSpy!
B
11
S
2
G
2
Posts: 14
Reputation: 1,185


Return to How do I....?

Who is online

Users browsing this forum: Nicolas951, Shenkai the ssj and 21 guests