How to make squash and stretch a ball at runtime

Hi y’all, I have this ball that I’m simulating physics on and I’m having some trouble making it squash and stretch with Control Rig. My current attempt looks like an egg because I’m doing the scaling wrong. How do I get it to stretch along the velocity axis and squash perpendicular to it, regardless of the current rotation of the ball?

309691-ball-control-rig.gif

Here’s my control rig

I think the scaling needs to happen in another space but I have no idea how to do the math for that to account for the physical rotation of the ball. I’m adding force to the skeletal mesh in the pawn and then getting its velocity in the anim blueprint and setting it as an input to the control rig in the animation blueprint.

Here’s how my skeletal mesh looks like, just one bone in the middle

This is the kind of behavior I’m after:

1 Like

Probably using:

or one of the many other similar marketplace products…

Hey I just wanted to know how you got shapes like this ?

One thing that I could think of is a two-bone setup. A root bone responsible for deformation, and another bone for rotation.

309734-ball.gif

1 Like

I see, so this is a blender bone set up problem? I have no idea how these things work, what’s a good place to learn about how to set up bones?

yea, that’s what I’m using, also hi ClockworkOcean, I’ve heard your name from the community spotlights!

I don’t know, frankly, I just imagined it might work and checked it. I’m not sure how to find anything about such particular setup.

In two words: add a root bone (it should be a bit higher than in my Gif, so that it would be at the lowest point of the sphere) and uncheck the Deform box in Bone Properties. Add another bone in the center of the ball and parent it to the root bone with Keep Offset option. Parent the ball to the second bone.

Now when you deform the root bone, it won’t directly affect the ball, but it will deform the second bone that, in turn, deforms the ball.

However, I don’t think that in this case it will be easy to properly set physics simulation for the ball itself. Maybe you’ll have to set physics simulation for the capsule, and have the skeletal mesh take care of the visual part separately based on velocity and other things. The root bone must always stay at the bottom for it to look right.

But again, to be fair, I have no idea how to set it up the right way in UE, I’ve never done anything like that.

This worked perfectly Tuerer, thank you!

Can you send a video of how it turned out it would really help a lot