Simple Blue Print to scale a ball

Simple Blue Print to scale a ball by how much it moves off physics…says like a snowball running down a hill getting bigger

Use a tick or a timer. Create 2 vector variables: Current Location and Previous Location; and a float variable Distance Travelled.

At each tick:

a) save Ball’s location to Current Location;

b) set Distance Travelled = Distance Travelled + ((Current Location - Previous Location).Get Vector Length());

c) set Previous Location = Current Location;

d) set Ball’s Scale depending on Distance Travelled;

At first Previous Location will be 0, so you have to set it to the Ball’s location on Begin Play.

Hi Tuerer,
Thankyou…im not a programmer but ill take a shot at that.
By chance could I get a blueprint pic of that.
Thanks again!

Sure. It’s not programming, it’s just math and some blueprint nodes =)

I’ll show you some screenshots in about 6 hours or so.

Here:

Thanks so much this works, but I need the actor(sphere) to keep its original size at start.

Change the math to whatever suits you best; clamp the final scale between 1 and max scale you want it to reach; and at the beginning you can add a Gate and only open it when a ball starts moving.

There are really many options to do that, here’s one.

Thankyou that worked great, could I bend your arm one more time, to do the same thing to the balls mass(weight)?

Just add a Set Mass Override in KG node after the scale. You might need to Cast the ball to Static Mesh Actor to do that.

Thanks again!