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
111
S
51
G
24
Posts: 787
Reputation: 23,394

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
25
S
14
G
139
Posts: 876
Reputation: 72,510

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: Cubeeo and 24 guests