# How to make squash and stretch a ball at runtime

**URL:** <https://forums.unrealengine.com/t/how-to-make-squash-and-stretch-a-ball-at-runtime/469483>\
**Category:** World Creation\
**Tags:** Blender, unreal-engine, FeatureRequest, Physics, question\
**Created:** [August 10, 2020, 2:08am UTC](https://forums.unrealengine.com/t/how-to-make-squash-and-stretch-a-ball-at-runtime/469483 "2020-08-10T02:08:32Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vlady\_Veselinov](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vlady_veselinov/32/621446_2.png) [@Vlady\_Veselinov](https://forums.unrealengine.com/u/Vlady_Veselinov)\
**Post date:** [August 10, 2020, 2:08am UTC](https://forums.unrealengine.com/t/how-to-make-squash-and-stretch-a-ball-at-runtime/469483/1 "2020-08-10T02:08:32Z")

</div>

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](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/a/4/ca4fc461df0f1a4285d5c8d645db6a1d5ae5825f.gif)

Here’s my control rig

 ![309678-ue4editor-qqdvo8zbub.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/d/e/fde0ffdac66684cb5fa74957f8525d7045686f4d.png)

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.

 ![309679-ue4editor-ty5hy8dkt7.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/e/8/de86ec7842eac2569a4bc9c76b464f3863e167eb.png)

 ![309680-ue4editor-bpcatjjqpu.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/f/6/ef63fe1a66940559af23c934d9e2edbbb69d4fa5.png)

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

 ![309693-blender-mcemyusqwc.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/c/2/dc2e6314ade35f6b7f3fb75ad1a2422940ba0f78.jpeg)

This is the kind of behavior I’m after:

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/f/4/af4efb63791b0c3ccb73b8a3b2ee8d2d58d42366.png)

---

<div class="post-metadata">

**Author:** ![Rag1804](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rag1804](https://forums.unrealengine.com/u/Rag1804)\
**Post date:** [August 10, 2020, 5:18am UTC](https://forums.unrealengine.com/t/how-to-make-squash-and-stretch-a-ball-at-runtime/469483/2 "2020-08-10T05:18:49Z")

</div>

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

 ![309715-shfbhdfbshfgf.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/7/0/0706b8bbf96f89feb66b08747198a4207454ac2d.png)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [August 10, 2020, 6:45am UTC](https://forums.unrealengine.com/t/how-to-make-squash-and-stretch-a-ball-at-runtime/469483/3 "2020-08-10T06:45:24Z")

</div>

Probably using:

> **[Electronic Nodes in Code Plugins - UE Marketplace](https://www.unrealengine.com/marketplace/en-US/product/electronic-nodes)**
>
> Improve the wire style of Blueprint, Material, Animation, Niagara, Control Rig and Gameplay Ability editors.

or one of the many other similar marketplace products…

---

<div class="post-metadata">

**Author:** ![Tuerer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tuerer/32/1008648_2.png) [@Tuerer](https://forums.unrealengine.com/u/Tuerer)\
**Post date:** [August 10, 2020, 8:38am UTC](https://forums.unrealengine.com/t/how-to-make-squash-and-stretch-a-ball-at-runtime/469483/4 "2020-08-10T08:38:38Z")

</div>

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](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/5/4/e54f007b636a63d9176b91653667fdf3b757223a.gif)

---

<div class="post-metadata">

**Author:** ![Vlady\_Veselinov](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vlady_veselinov/32/621446_2.png) [@Vlady\_Veselinov](https://forums.unrealengine.com/u/Vlady_Veselinov)\
**Post date:** [August 10, 2020, 9:49am UTC](https://forums.unrealengine.com/t/how-to-make-squash-and-stretch-a-ball-at-runtime/469483/5 "2020-08-10T09:49:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Vlady\_Veselinov](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vlady_veselinov/32/621446_2.png) [@Vlady\_Veselinov](https://forums.unrealengine.com/u/Vlady_Veselinov)\
**Post date:** [August 10, 2020, 10:55am UTC](https://forums.unrealengine.com/t/how-to-make-squash-and-stretch-a-ball-at-runtime/469483/6 "2020-08-10T10:55:53Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Tuerer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tuerer/32/1008648_2.png) [@Tuerer](https://forums.unrealengine.com/u/Tuerer)\
**Post date:** [August 10, 2020, 11:48am UTC](https://forums.unrealengine.com/t/how-to-make-squash-and-stretch-a-ball-at-runtime/469483/7 "2020-08-10T11:48:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Vlady\_Veselinov](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vlady_veselinov/32/621446_2.png) [@Vlady\_Veselinov](https://forums.unrealengine.com/u/Vlady_Veselinov)\
**Post date:** [October 1, 2020, 10:35pm UTC](https://forums.unrealengine.com/t/how-to-make-squash-and-stretch-a-ball-at-runtime/469483/8 "2020-10-01T22:35:45Z")

</div>

This worked perfectly Tuerer, thank you!

---

<div class="post-metadata">

**Author:** ![Darkknight345467](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Darkknight345467](https://forums.unrealengine.com/u/Darkknight345467)\
**Post date:** [September 10, 2022, 2:02pm UTC](https://forums.unrealengine.com/t/how-to-make-squash-and-stretch-a-ball-at-runtime/469483/9 "2022-09-10T14:02:29Z")

</div>

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