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
94
S
33
G
118
Posts: 5,396
Reputation: 75,853

Post » Mon Jul 31, 2017 10:40 am

@R0J0hound Brilliant! Works like a charm. I owe you a bagful of scooby snacks :)
B
22
S
9
G
4
Posts: 479
Reputation: 4,333

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: 34
Reputation: 470

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests