r80.2 anglelerp

Bugs will be moved here once resolved.

Post » Wed Feb 29, 2012 5:03 pm

It's not lerping correctly - or am I missing something?

[code]System: "something" -> Sprite | Set angle to anglelerp(self.Angle, 45, dt)[/code]

Red square indicates current angle of the sprite.


Works as it should, nothings wrong here.


But if sprite angle is changed to something different than 0, like here for example:


Sprites angle should rotate to "green" position instead it's going all the way to "red" position (original angle position).
shinkan2012-02-29 17:04:04
ImageImageImageImage
B
158
S
66
G
43
Posts: 2,603
Reputation: 35,868

Post » Wed Feb 29, 2012 5:17 pm

Nope, angles are static. If you want the new position to add 45 degrees, you'll have to add the angle before hand. Ie set angle to anglelerp(self.angle,self.variable("oldangle")+45,dt)
Image ImageImage
B
171
S
50
G
179
Posts: 8,382
Reputation: 113,458

Post » Wed Feb 29, 2012 5:36 pm

Thanks @newt.
ImageImageImageImage
B
158
S
66
G
43
Posts: 2,603
Reputation: 35,868

Post » Wed Feb 29, 2012 5:37 pm

Sure thing. Cool feature, glad we have it.
Image ImageImage
B
171
S
50
G
179
Posts: 8,382
Reputation: 113,458

Post » Wed Feb 29, 2012 6:17 pm

So, not a bug?
Scirra Founder
B
399
S
236
G
89
Posts: 24,525
Reputation: 195,382

Post » Wed Feb 29, 2012 6:32 pm

it's not lerping by 45 degrees, it's lerping to 45 degrees. Not a bug.Fimbul2012-02-29 18:32:15
B
36
S
8
G
8
Posts: 532
Reputation: 6,903

Post » Wed Feb 29, 2012 7:20 pm

OK, closing then.
Scirra Founder
B
399
S
236
G
89
Posts: 24,525
Reputation: 195,382

Post » Wed Feb 29, 2012 7:21 pm

@Ashley no, not a bug. But you could mention that somwhere, manual maybe or anglelerp exp. itself in editor, cause it's a bit confusing at begining.
ImageImageImageImage
B
158
S
66
G
43
Posts: 2,603
Reputation: 35,868


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests