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
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

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 Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Wed Feb 29, 2012 5:36 pm

Thanks @newt.
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Wed Feb 29, 2012 5:37 pm

Sure thing. Cool feature, glad we have it.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Wed Feb 29, 2012 6:17 pm

So, not a bug?
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,508

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
35
S
8
G
8
Posts: 532
Reputation: 6,868

Post » Wed Feb 29, 2012 7:20 pm

OK, closing then.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,508

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
140
S
58
G
36
Posts: 2,547
Reputation: 31,170


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests