# How to change collision box for physics asset in runtime

**URL:** <https://forums.unrealengine.com/t/how-to-change-collision-box-for-physics-asset-in-runtime/451758>\
**Category:** World Creation\
**Tags:** unreal-engine, Physics, Collision, Blueprint, question\
**Created:** [July 5, 2019, 5:46pm UTC](https://forums.unrealengine.com/t/how-to-change-collision-box-for-physics-asset-in-runtime/451758 "2019-07-05T17:46:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kelheor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kelheor](https://forums.unrealengine.com/u/Kelheor)\
**Post date:** [July 5, 2019, 5:46pm UTC](https://forums.unrealengine.com/t/how-to-change-collision-box-for-physics-asset-in-runtime/451758/1 "2019-07-05T17:46:33Z")

</div>

I have skeletal mesh and need to change its collision(simple box collider) size in runtime. Collision box created in Physics Asset. How can I do that? Also is there any ways to detect actor size in meters(or similar units) to set proper collision scale in runtime, depending on all skeletal meshes in an actor (something like detecting bounding box size)?

---

<div class="post-metadata">

**Author:** ![ianFisch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ianFisch](https://forums.unrealengine.com/u/ianFisch)\
**Post date:** [August 14, 2020, 9:47pm UTC](https://forums.unrealengine.com/t/how-to-change-collision-box-for-physics-asset-in-runtime/451758/2 "2020-08-14T21:47:49Z")

</div>

Anyone? I’m also interested in changing aspects of the physics asset at runtime.

---

<div class="post-metadata">

**Author:** ![Alakuloinen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alakuloinen](https://forums.unrealengine.com/u/Alakuloinen)\
**Post date:** [January 24, 2021, 7:14pm UTC](https://forums.unrealengine.com/t/how-to-change-collision-box-for-physics-asset-in-runtime/451758/3 "2021-01-24T19:14:00Z")

</div>

Hey there. I’m not sure if you can change the exact geometry of a physics asset at runtime, but you can do some tricks with the existing geometry. Most of them are not available in blueprints, though. In C++, a skeletal mesh has a “Bodies” array of FBodyInstance\*. Each Body Instance has plenty of methods, e.g.

```
UpdateBodyScale(const FVector& InScale3D, bool bForceUpdate)

```

directly changes the scale of the shape in 3D, I believe it is what you need, but once again, it’s not exposed to blueprints and will hardly ever be.

---

<div class="post-metadata">

**Author:** ![Cosmik-Debris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Cosmik-Debris](https://forums.unrealengine.com/u/Cosmik-Debris)\
**Post date:** [April 11, 2021, 2:17pm UTC](https://forums.unrealengine.com/t/how-to-change-collision-box-for-physics-asset-in-runtime/451758/4 "2021-04-11T14:17:30Z")

</div>

I’ve tried this but it doesn’t seem to work even with force update set to true. The function returns true to say it’s been successful but there’s no difference in the game.

I also tried calling RecreatePhysicsState() after but it’s still not working, maybe there’s some trick I’m missing.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_dffb6b25](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_dffb6b25](https://forums.unrealengine.com/u/anonymous_user_dffb6b25)\
**Post date:** [September 28, 2021, 9:53am UTC](https://forums.unrealengine.com/t/how-to-change-collision-box-for-physics-asset-in-runtime/451758/5 "2021-09-28T09:53:06Z")

</div>

I know it’s a bit late, but for anyone interested, I’ve found a workaround for scaling bones, modifying physics and collisions correctly:

1. make an extra bone for each part that can be scaled, these bones will have the rig information and will be children of the bones that we would like to scale, in my case:

- tail\_1

- tail\_1\_scale (this will be the one that contains the rig information)

What we will do with these bones is to scale only the child bones and modify the parent ones.

1. The first thing is to create an animation we would use to scale the bones, but instead of scaling them we are going to distance the bones from each other, without scaling them, just moving them, and we are going to scale only the bones with the subfix “\_scale”.

2.5) If we don’t want to use animations, we will do it from the nodes “modify transform (bone)” from the anim blueprint, and we will modify the scale of the child bones “tail\_1\_scale”, and the offset of the parents with a copy of the same node.

After doing either of these two options, we will be able to verify that visually the engine does change the length and scale of the bones when the animation is active, but we need much more for that displacement and scale to serve us in other scenarios.

1. In the Physics Asset, we are only going to add bodies in the parent bones “tail\_1”, in my case I have added a small sphere at the beginning of the bone with the mass set to automatic.

For the next step we will need a function written in **C ++** that allows us to modify the position of the constraints in frame 2 (the position of the second body relative to the constraint). I think Unreal 5 has a blueprint function for that.

1. In the script that is modifying the scale, we are going to multiply the position of the next bone from frame 2 of the constraint, in my case the next bone is “tail\_2”, by the scale of the bone that we are scaling, thus adding the offset that the parent scale would have added.

2. For the collisions we can create them procedurally with add component, or manually if you prefer, we can store these collisions in a map, with the bone name as key, and a structure with an array with the respective collisions as value, in this way, once the collision is created, we will have to attach it to the parent bone “tail\_1” with the node “attachComponentToComponent” and checking “weld bodies” it is important that the collisions created are simulating physics, and have an appropriate collision profile, each time we modify these bones, we can call a function that updates the shape or quantity of the collisions. This will even distribute the weight correctly.

Note: in my case I bought a plugin that has saved me a lot of headaches called “collision disabler” created by Tomasz Klin, which allows me to add collisions while keeping the possibility that the other parts of the skeletal mesh keep the collisions with them, if you use this plugin make sure to disable collisions between adjoining bodies before attaching it with the bones.

---

<div class="post-metadata">

**Author:** ![dandingol03](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dandingol03/32/769404_2.png) [@dandingol03](https://forums.unrealengine.com/u/dandingol03)\
**Post date:** [November 23, 2023, 7:40am UTC](https://forums.unrealengine.com/t/how-to-change-collision-box-for-physics-asset-in-runtime/451758/6 "2023-11-23T07:40:44Z")

</div>

> [@Cosmik-Debris](#):
>
> RecreatePhysicsState

Have you figture out why the `RecreatePhysicsState` api doesn’t work? I met the same problem recently

---

<div class="post-metadata">

**Author:** ![dandingol03](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dandingol03/32/769404_2.png) [@dandingol03](https://forums.unrealengine.com/u/dandingol03)\
**Post date:** [November 23, 2023, 7:48am UTC](https://forums.unrealengine.com/t/how-to-change-collision-box-for-physics-asset-in-runtime/451758/7 "2023-11-23T07:48:12Z")

</div>

> [@anonymous\_user\_dffb6b25](#):
>
> collision disabler

So difficult to implement it. Have you tried to implement a plugin for these? Plugin is more clear

---

<div class="post-metadata">

**Author:** ![dandingol03](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dandingol03/32/769404_2.png) [@dandingol03](https://forums.unrealengine.com/u/dandingol03)\
**Post date:** [November 24, 2023, 10:05am UTC](https://forums.unrealengine.com/t/how-to-change-collision-box-for-physics-asset-in-runtime/451758/8 "2023-11-24T10:05:32Z")

</div>

> [@Alakuloinen](#):
>
> `UpdateBodyScale`

sounds right, i will write a demo to verify that

---

<div class="post-metadata">

**Author:** ![S4gv4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@S4gv4](https://forums.unrealengine.com/u/S4gv4)\
**Post date:** [June 13, 2025, 3:08am UTC](https://forums.unrealengine.com/t/how-to-change-collision-box-for-physics-asset-in-runtime/451758/9 "2025-06-13T03:08:06Z")

</div>

Relevant
