How do I rotate smoothly 90 degrees with LERP?

Get help using Construct 2

Post » Thu Apr 09, 2015 11:57 am

I tried to use lap to smoothly rotate a sprite car but I it didn't work as I need. Any help?

I create a demonstrations to simulate this.

https://www.dropbox.com/s/90kjtplm12dz7 ... .capx?dl=0

Thanks
B
70
S
13
G
2
Posts: 989
Reputation: 6,914

Post » Thu Apr 09, 2015 12:11 pm

I'm not sure why you are using anglelerp to try and create this effect, but I do know that on collision is only triggered once..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Apr 09, 2015 12:41 pm

Image
B
61
S
23
G
7
Posts: 1,461
Reputation: 10,686

Post » Thu Apr 09, 2015 12:52 pm

Perfect, @korbaach! Now I understand why it was not working for me.

Thank you so much.
B
70
S
13
G
2
Posts: 989
Reputation: 6,914

Post » Thu Apr 09, 2015 2:04 pm

@korbaach

One question: is possible to align the spriteCar with spriteCorner? With the same X or Y position depending on the angle? For example: if spriteCar turn right when collide with the 1st spriteCorner, it needs to keep the same X position. Thanks.
B
70
S
13
G
2
Posts: 989
Reputation: 6,914

Post » Thu Apr 09, 2015 3:34 pm

Image
B
61
S
23
G
7
Posts: 1,461
Reputation: 10,686

Post » Thu Apr 09, 2015 4:49 pm

Thanks @korbaach.

But I believe that we have a problem: if I use 2 spriteCorners to turn left, the coordinate will change, although it still with the same "turn" value

Is there a way of spriteCar use the same image point position of the spriteCorner that it collided?
B
70
S
13
G
2
Posts: 989
Reputation: 6,914

Post » Thu Apr 09, 2015 4:57 pm

..you believe, or are you sure? :)
please upload capx...


Image

Image
Image
B
61
S
23
G
7
Posts: 1,461
Reputation: 10,686

Post » Thu Apr 09, 2015 5:12 pm

Actually, was a guess, but when I test this theory in the capx you sent, the spriteCar right past the second spriteCorner set to turn "2" and nothing happened. Maybe my mistake.
B
70
S
13
G
2
Posts: 989
Reputation: 6,914

Post » Thu Apr 09, 2015 5:18 pm

Maybe, is this a bug? :D
Image
B
61
S
23
G
7
Posts: 1,461
Reputation: 10,686

Next

Return to How do I....?

Who is online

Users browsing this forum: hielo777, keeno79, smlyldz and 13 guests