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
147
S
58
G
38
Posts: 2,557
Reputation: 32,526

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
164
S
49
G
112
Posts: 7,645
Reputation: 78,489

Post » Wed Feb 29, 2012 5:36 pm

Thanks @newt.
ImageImageImageImage
B
147
S
58
G
38
Posts: 2,557
Reputation: 32,526

Post » Wed Feb 29, 2012 5:37 pm

Sure thing. Cool feature, glad we have it.
Image Image
B
164
S
49
G
112
Posts: 7,645
Reputation: 78,489

Post » Wed Feb 29, 2012 6:17 pm

So, not a bug?
Scirra Founder
B
367
S
217
G
82
Posts: 23,262
Reputation: 183,679

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,893

Post » Wed Feb 29, 2012 7:20 pm

OK, closing then.
Scirra Founder
B
367
S
217
G
82
Posts: 23,262
Reputation: 183,679

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
147
S
58
G
38
Posts: 2,557
Reputation: 32,526


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests