Maths?
I would like to make an actor twice as big or twice as small
I know I can do this lots of ways but this is a question about the maths not working and what I'm doing wrong
actor is 100
interpolate self.hight to self.hight*2 This makes the actor much much bigger then 200
interpolate self.hight to self.hight/2 this makes the actor much much smaller than 50
can someone explain? think its getting stuck in a loop?
and what math you use interpolate to *2 hight or /2 hight
thanks
I know I can do this lots of ways but this is a question about the maths not working and what I'm doing wrong
actor is 100
interpolate self.hight to self.hight*2 This makes the actor much much bigger then 200
interpolate self.hight to self.hight/2 this makes the actor much much smaller than 50
can someone explain? think its getting stuck in a loop?
and what math you use interpolate to *2 hight or /2 hight
thanks
Comments
I no other ways to do this just trying to understand the maths
The value in Interpolate is changing.
At 50 pixels, it's trying to grow to 50 x 2
At 75 pixels, it's trying to grow to 75 x 2
Your target value is changing.
To fix this, you can use an attribute to store the target size... like self.targetX
If actor is touched,
Change self.targetX to self.size width*2
Interpolate self.size width to self.targetX
Thats what I'm doing just did not understand why it did not work the other way