Why is the sprite not moving while scale is changing?

Get help using Construct 2

Post » Thu Jun 04, 2015 12:16 pm

Hello guys!
Can you explain to me, why is the sprite not moving while self.scale is changing?

Image
Image
Capx: http://files.efekt.sk/repository/Obrazky/Discussion%20Forum/preview.capx
B
24
S
3
G
1
Posts: 42
Reputation: 1,543

Post » Thu Jun 04, 2015 1:42 pm

I'd guess that it is because you are rapidly changing it's mass by changing it's size/volume. (Remove event 2 and you'll see that the smaller object moves faster than when it is big, so size does affect motion. It takes more energy to get that larger object moving.)
ImageImageImage
B
71
S
21
G
221
Posts: 3,649
Reputation: 124,227

Post » Thu Jun 04, 2015 2:12 pm

You are right that size affects the speed of movement. So the question is: Is there a way to preserve the movement when mass is changing?
B
24
S
3
G
1
Posts: 42
Reputation: 1,543

Post » Thu Jun 04, 2015 2:28 pm

Although I'm not sure why you use lerp for this and why you let it go on for so long when after 0.99 the difference isn't even visible anymore,
It's always possible to get vectorX and vectorY from the physics behaviour and move the object by that many pixels in the x and y direction while the scale is changing..
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 Jun 04, 2015 3:47 pm

Thanks for your tip, but I can't use another type of movement as Physics forces. Then object pass through each other. I can remove the lerp, but it will not look as good as it did with it.
B
24
S
3
G
1
Posts: 42
Reputation: 1,543


Return to How do I....?

Who is online

Users browsing this forum: jkmalau and 17 guests