[Solved] Shape Painter circle radius not tweening to target in 5s

I want to make a circle in Shape Painter expand its radius from 0 to 300 in 5 seconds. I set up a tween with linear easing and also chose ‘Yes’ for the option to destroy the object when the tween finishes. But the result is wrong: the circle expands quickly at first, then slows down, and even after 5 seconds it keeps expanding but still doesn’t reach 300. How can I make it increase smoothly and stop exactly at 300 after 5 seconds?

Hi pqrs, sounds like a nice effect :bubbles:. I think tweens can get a bit confused when there’s no condition that limits it. So just adding a trigger once should make a difference. Because otherwise it never gets triggered that the tween has actually finished.

2 Likes

I agree with Bubble. Without some form of trigger once condition, the tween will get restarted on every frame.

The amount that the tween has to change on each frame is slightly smaller each time it gets reset because it has a shorter distance to go. The closer it gets to its goal, the smaller the individual steps are. At that pace, it may never reach the target value.

2 Likes

Adding ‘Trigger once’ almost worked. Now the circle expands, reaches the target radius, and deletes the object. But the timing is off: when I set the tween time to 5s, it takes about 7s to reach 300. When I set 10s, it takes about 15s. What’s wrong? Could it be lag/FPS drop?

I would need to test it. Imo, the shape painter can be very laggy.

Are you clearing the image on every frame? It should be faster if it’s cleared on every frame. Either manually with the action or through the behavior setting.

Yes, I left the option ‘Clear the rendered image on each frame’ checked.

I would need to test it. It might be less laggy to scale or resize a sprite or maybe a shape painter that’s drawn on just once. IDK. I’ve experienced a lot of lag with repeated drawing on a shape painter but not when the image is cleared between frames.

1 Like

Hi again, I just tested it for 10 seconds using your exact setup from you pic and the ‘bubble popped’ exactly after 10 seconds. To give it more chance to lag I also tried 20 seconds but there was no delay.

1 Like

I tried it in a new project and it works fine, no delay.
But in my real project there’s still a delay. When I toggled lots of events off, it suddenly worked. :V

Regarding Shape Painter: if the object is created dynamically (so sometimes none exist in the scene), is it okay to still run the draw actions? Or should I only run draw actions when at least one Shape Painter (of the object) instance exists in the scene?

Which is better? Both work, but currently I’m using no.1.

Maybe it really is lag, since I’m using lots of Shape Painter objects. In my real project the circle expansion isn’t smooth, kind of laggy. But when I test the same thing in a new project, the expansion is very smooth.

I would use version 2 although, you can use 1 event. There’s no need to seperate the actions and add a 2nd condition.

Edit: I see they’re different objects. In that case. I’d put them into a group and use a for each object.

If tween for group name exists or is playing (whichever conditions you want)
… For each group name

The fewer conditions and actions that are processed during each frame the better.

You could also use a boolean for mode or maybe tween is playing.

2 Likes