Parabolic movement between 2 points

Get help using Construct 2

Post » Sun Jul 30, 2017 11:35 pm

@mekonbekon
Remove the t<1 condition and change the "set t" expression to self.t+dt/leaptime.
B
92
S
32
G
109
Posts: 5,290
Reputation: 70,991

Post » Mon Jul 31, 2017 10:40 am

@R0J0hound Brilliant! Works like a charm. I owe you a bagful of scooby snacks :)
B
20
S
8
G
3
Posts: 457
Reputation: 4,053

Post » Wed Sep 20, 2017 1:13 pm

Thanks @R0J0hound, using your example, I manage to fix the X position of the object to another object, base on the distance and speed of this last object.

I calculated the distance between the points and divided by its speed --> var=(dist(start.x,start.y,end.x,end.y)/sprite.speed

Then I put it into your 't' variable --> t=min(t+timedelta/var,1)

I just post that in case of anyone want a leap distance/time instead of using a variable for the speed you use in the lerp.
B
6
S
1
Posts: 33
Reputation: 468

Previous

Return to How do I....?

Who is online

Users browsing this forum: bclikesyou, brunopalermo, kellehk, R0J0hound, ST314 and 23 guests