# Disable and Enable Actor physics

**URL:** <https://forums.unrealengine.com/t/disable-and-enable-actor-physics/342861>\
**Category:** World Creation\
**Tags:** setactorlocation, unreal-engine, Physics, CPP, question\
**Created:** [January 1, 2016, 7:32pm UTC](https://forums.unrealengine.com/t/disable-and-enable-actor-physics/342861 "2016-01-01T19:32:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![LonesomeSoldier](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LonesomeSoldier](https://forums.unrealengine.com/u/LonesomeSoldier)\
**Post date:** [January 1, 2016, 7:32pm UTC](https://forums.unrealengine.com/t/disable-and-enable-actor-physics/342861/1 "2016-01-01T19:32:46Z")

</div>

Hi! Happy new year! 🙂

I am working on an inventory system. I can pick up items, it is placed in my inventory, and I can drop the items back into the world, all is fine, except for one thing; the mechanism I use is to not destroy the item that is put in the inventory, but to disable it and hide it. Then upon dropping the item, I am calling SetActorLocation, putting it in front of my character. This is all well and good but, my items have physics enabled, and if the item was in motion when I picked it up, then when I drop it, it still has that physics / momentum, and it drops to the ground moving in the same direction as it was moving when I picked it up.

I found a solution for this, which is before calling SetActorLocation, I can call DisableComponentsSimulatePhysics() on the actor. That works. But then, of course, when the item is dopped, it just hangs in the air - no physics. And I do not find an equivalent EnableComponentsSimulatePhysics() method on Actor.

So my question is, how can I either 1) remove all inertia / momentum from my actor, or 2) re-enable physics after I have disabled and placed my actor?

Thanks!  
PS: This is in C++.

Marius.

 ![72531-actorlocation.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/e/4/ae41a6ee54d81233b310059424585f35292d05c4.png)

---

<div class="post-metadata">

**Author:** ![Daekesh](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/daekesh/32/918652_2.png) [@Daekesh](https://forums.unrealengine.com/u/Daekesh)\
**Post date:** [January 1, 2016, 7:37pm UTC](https://forums.unrealengine.com/t/disable-and-enable-actor-physics/342861/2 "2016-01-01T19:37:25Z")

</div>

Disable physics on the root component. It should be as simple as actor-\>GetRootComponent()-\>SetSimulatePhysics( false );

And have an epic new year!

---

<div class="post-metadata">

**Author:** ![LonesomeSoldier](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LonesomeSoldier](https://forums.unrealengine.com/u/LonesomeSoldier)\
**Post date:** [January 1, 2016, 7:43pm UTC](https://forums.unrealengine.com/t/disable-and-enable-actor-physics/342861/3 "2016-01-01T19:43:37Z")

</div>

Perfect, thanks!

---

<div class="post-metadata">

**Author:** ![FunAndFriendly](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FunAndFriendly](https://forums.unrealengine.com/u/FunAndFriendly)\
**Post date:** [August 17, 2020, 4:23pm UTC](https://forums.unrealengine.com/t/disable-and-enable-actor-physics/342861/4 "2020-08-17T16:23:37Z")

</div>

DropActor-\>GetRootComponent()-\>SetSimulatePhysics(true);

error C2039: ‘SetSimulatePhysics’: is not a member of ‘USceneComponent’

---

<div class="post-metadata">

**Author:** ![SeGuVeGa](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/seguvega/32/977989_2.png) [@SeGuVeGa](https://forums.unrealengine.com/u/SeGuVeGa)\
**Post date:** [April 3, 2021, 5:02am UTC](https://forums.unrealengine.com/t/disable-and-enable-actor-physics/342861/5 "2021-04-03T05:02:21Z")

</div>

Use the Primitive Component

1. UPrimitiveComponent\*  
PhysicsActorBody;

2. ///GetComponent()

3. PhysicsActorBody-\>SetSimulatePhysics(true);
