# PhysicsActor don't stack

**URL:** <https://forums.unrealengine.com/t/physicsactor-dont-stack/465919>\
**Category:** XR Development\
**Tags:** actor, unreal-engine, FeatureRequest, Physics, pickups, Collision, question\
**Created:** [May 28, 2020, 9:07am UTC](https://forums.unrealengine.com/t/physicsactor-dont-stack/465919 "2020-05-28T09:07:57Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Teapot\_Creation](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Teapot\_Creation](https://forums.unrealengine.com/u/Teapot_Creation)\
**Post date:** [May 28, 2020, 9:07am UTC](https://forums.unrealengine.com/t/physicsactor-dont-stack/465919/1 "2020-05-28T09:07:57Z")

</div>

Hey there,  
I’ve got an issue with physics actors that interpenetrate instead of stacking on each other.  
It happens sometimes, not each time, as seen in the gif below.

![303049-hnetcom-image.gif](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/3/b/43b21f454c950b9c5d2825f558f9f29e52200a6a.gif)

Actors are boxes with simple collisions and this setup :

 ![303046-capture.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/8/e/08e8e504f4e7e693afb41fbbdd89e2267211817e.jpeg)

Does somebody know why this appends ?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 28, 2020, 9:14am UTC](https://forums.unrealengine.com/t/physicsactor-dont-stack/465919/2 "2020-05-28T09:14:52Z")

</div>

As a quick test, can you reverse the order of execution onDrop? Detach first and then simulate?

Is the static mesh the root of the actor btw?

---

<div class="post-metadata">

**Author:** ![Teapot\_Creation](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Teapot\_Creation](https://forums.unrealengine.com/u/Teapot_Creation)\
**Post date:** [May 28, 2020, 9:54am UTC](https://forums.unrealengine.com/t/physicsactor-dont-stack/465919/3 "2020-05-28T09:54:16Z")

</div>

Result is the same when inverting the order as asked.  
And yes, the actor consists of a single StaticMesh.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 28, 2020, 10:18am UTC](https://forums.unrealengine.com/t/physicsactor-dont-stack/465919/4 "2020-05-28T10:18:45Z")

</div>

> And yes, the actor consists of a  
> single StaticMesh.

That was not my question. Is the static mesh the root of the actor or is it attached to the scene component that makes the root?

This one is critical when simulating physics actually and it’s easy to be caught off guard here. Simulating this _can_ be unpredictable at times, for example:

![303038-annotation-2020-05-28-112112.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/9/7190da7ee46566d626522033f289d041eba47013.jpeg)

Especially seeing that you attach and detach actors. Just making sure, nothing more.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 28, 2020, 10:26am UTC](https://forums.unrealengine.com/t/physicsactor-dont-stack/465919/5 "2020-05-28T10:26:55Z")

</div>

The next step I’d try would be to increase these two:

 ![303039-annotation-2020-05-28-112604.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/0/4/e04b2535842a872330659af26bc1457c7151cc74.jpeg)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 28, 2020, 10:33am UTC](https://forums.unrealengine.com/t/physicsactor-dont-stack/465919/6 "2020-05-28T10:33:23Z")

</div>

> Especially seeing that you attach and  
> detach actors.

Also, is there a reason why you attach a component but detach an actor?

---

<div class="post-metadata">

**Author:** ![Teapot\_Creation](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Teapot\_Creation](https://forums.unrealengine.com/u/Teapot_Creation)\
**Post date:** [May 28, 2020, 11:38am UTC](https://forums.unrealengine.com/t/physicsactor-dont-stack/465919/7 "2020-05-28T11:38:19Z")

</div>

Actually when I said “a single StaticMesh” I meant StaticMeshComponent, which one is the root of the actor.

---

<div class="post-metadata">

**Author:** ![Teapot\_Creation](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Teapot\_Creation](https://forums.unrealengine.com/u/Teapot_Creation)\
**Post date:** [May 28, 2020, 11:41am UTC](https://forums.unrealengine.com/t/physicsactor-dont-stack/465919/8 "2020-05-28T11:41:16Z")

</div>

There is no node existing for “detach component”. Also I attach a component instead of an actor cause I used the same scheme for different actors and some need to have just their root component attached and keep the actor location. But it doesn’t change anything to the issue (just checked). That’s right in this case attaching the actor would work the same.

---

<div class="post-metadata">

**Author:** ![Teapot\_Creation](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Teapot\_Creation](https://forums.unrealengine.com/u/Teapot_Creation)\
**Post date:** [May 28, 2020, 11:43am UTC](https://forums.unrealengine.com/t/physicsactor-dont-stack/465919/9 "2020-05-28T11:43:25Z")

</div>

No success. Checked with 16 and 8 respectively Position and Velocity. What value should I try ?

---

<div class="post-metadata">

**Author:** ![AyanMiru](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ayanmiru/32/1194638_2.png) [@AyanMiru](https://forums.unrealengine.com/u/AyanMiru)\
**Post date:** [June 1, 2020, 3:54am UTC](https://forums.unrealengine.com/t/physicsactor-dont-stack/465919/10 "2020-06-01T03:54:10Z")

</div>

Afaik, the root component’s transform IS the Actor’s transforms. But regardless, this setup should work. Is it happening with all meshes? Have you tried to reproduce the issue with editor’s default cube? Could you also try to test it without BP logic (just stack them above each other and simulate, so we can pinpoint if its BP problem).

---

<div class="post-metadata">

**Author:** ![Teapot\_Creation](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Teapot\_Creation](https://forums.unrealengine.com/u/Teapot_Creation)\
**Post date:** [June 1, 2020, 7:33am UTC](https://forums.unrealengine.com/t/physicsactor-dont-stack/465919/11 "2020-06-01T07:33:50Z")

</div>

Well this happens with default cube too (see pic). Also when removing the BP logic, the actors stack well. Perhaps is it due to a specific alignment from both actors ?  
I tried with other meshes in my scene. It seems to happen too, but these are the only one to be so big and “stackable” : other meshes are tiny and less cubic (or there is only one), when dropping one over another they interpenetrate and just after the second one is “pushed” next to the first so they don’t stay one in the other.

 ![303342-capture2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/4/e/d4e90d04efe2eb937155aaabcde9e462c7cc8bc4.jpeg)

---

<div class="post-metadata">

**Author:** ![Teapot\_Creation](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Teapot\_Creation](https://forums.unrealengine.com/u/Teapot_Creation)\
**Post date:** [June 9, 2020, 7:23am UTC](https://forums.unrealengine.com/t/physicsactor-dont-stack/465919/12 "2020-06-09T07:23:02Z")

</div>

Any new idea here ? The problem persists 😕

---

<div class="post-metadata">

**Author:** ![AyanMiru](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ayanmiru/32/1194638_2.png) [@AyanMiru](https://forums.unrealengine.com/u/AyanMiru)\
**Post date:** [June 11, 2020, 3:00am UTC](https://forums.unrealengine.com/t/physicsactor-dont-stack/465919/13 "2020-06-11T03:00:19Z")

</div>

I wasn’t able to reproduce that without VR part. If you can upload a minimal project with this problem (which can be played without VR) I will try it. As a work-around I can suggest you keeping your objects with simulate physics = true, and control them with physics handle component. It’ll be more similar to how HL:Alyx or BoneWorks approach their pickUp logic.

---

<div class="post-metadata">

**Author:** ![Teapot\_Creation](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Teapot\_Creation](https://forums.unrealengine.com/u/Teapot_Creation)\
**Post date:** [June 11, 2020, 6:44am UTC](https://forums.unrealengine.com/t/physicsactor-dont-stack/465919/14 "2020-06-11T06:44:37Z")

</div>

Unfortunately I don’t know how to make such a setup without the VR part. Using a “standard” pawn will not react the same imo. How do you mind the thing ?

Also using physics handle would make me modify all the movable meshes of my game - huge changes for a “minor” bug after all. And imo HL Alyx doesn’t use physics handle for taking objects in hand (but the distance grabbing probably do), does it ?
