# Unable to declare UPhysicsHandleComponent

**URL:** <https://forums.unrealengine.com/t/unable-to-declare-uphysicshandlecomponent/353336>\
**Category:** C++\
**Tags:** vs2015, UE4-11, unreal-engine, intellisense, question, CPP\
**Created:** [April 7, 2016, 7:35pm UTC](https://forums.unrealengine.com/t/unable-to-declare-uphysicshandlecomponent/353336 "2016-04-07T19:35:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_71667b54](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_71667b54](https://forums.unrealengine.com/u/anonymous_user_71667b54)\
**Post date:** [April 7, 2016, 7:35pm UTC](https://forums.unrealengine.com/t/unable-to-declare-uphysicshandlecomponent/353336/1 "2016-04-07T19:35:00Z")

</div>

Hi

I’m unable to declare `UPhysicsHandleComponent` and `ATriggerVolume` classes in VS2015. Basically Intellisense doesn’t recognizes them.

1. I create a new Basic Code C++ project in Unreal
2. I create a new C++ **Actor Component** class
3. In the new **Actor Component** class created I just add this line, not touching anything else:  
`UPhysicsHandleComponent* MyHandle`

As you can see, Intellisense doesn’t detect UPhysicsHandleComponent:

 ![85421-test_handlecomponent.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/3/b/c3b62b773d5cb34cd6c9fb83ef54be717165248c.png)

When I hard code it, I get this:

![85422-test_pointer.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/8/1/18147ec2a1a7a3641e842a6e3f067a1bb301cd82.png)

When I compile, I get this:

 ![85423-test_error.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/9/c/39ccdca907afb0dd166b256f6d9f019c3a51a977.png)

The same happens when trying to declare a `ATriggerVolume` class.

Is anybody having this problem or able to reproduce this issue?

Specs:

Unreal 4.11

Windows 10 Home - OS Build 10586.164

NVIDIA GeForce GTX 960 - Driver version 364.72

Visual Studio Community 2015 v14.0.25123.00 Update 2

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [April 7, 2016, 8:29pm UTC](https://forums.unrealengine.com/t/unable-to-declare-uphysicshandlecomponent/353336/2 "2016-04-07T20:29:50Z")

</div>

Hello,

I’ve performed a couple of tests on different machines, but haven’t been able to reproduce your issue. I am able to add a Physics Handle Component to an Actor Component class successfully.

Do you get this same compiler error if you attempt to follow your repro steps in a clean project with no additional content?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_71667b54](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_71667b54](https://forums.unrealengine.com/u/anonymous_user_71667b54)\
**Post date:** [April 11, 2016, 4:46pm UTC](https://forums.unrealengine.com/t/unable-to-declare-uphysicshandlecomponent/353336/3 "2016-04-11T16:46:24Z")

</div>

Hi Sean

Sorry for the late answer. I’ve done several tests, reinstalling the OS several times and changing the installation order for UE4 and VS2015.

Conclusion:

- If a use a **Basic Code** C++ Project and I add an **Actor Component** class, I have no problem declaring `UPhysicsHandleComponent`
- If a use a **First Person** C++ Project and I add an **Actor Component** class, I cannot declare `UPhysicsHandleComponent` as per the screenshot errors.

Can you confirm that you have no problems declaring `UPhysicsHandleComponent` in a **First Person** C++ Project?

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [April 11, 2016, 5:18pm UTC](https://forums.unrealengine.com/t/unable-to-declare-uphysicshandlecomponent/353336/4 "2016-04-11T17:18:03Z")

</div>

Hello,

The reason for this is that the First Person Template includes EngineMinimal.h in your project’s header file. The easiest thing to do would be to include Engine.h in your Actor Component class, as this will resolve your compiler error. Otherwise, you can go into your project’s header file and include Engine.h if you plan to use the features of that class in multiple classes in your project.

Have a great day

---

<div class="post-metadata">

**Author:** ![Shacbro](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shacbro](https://forums.unrealengine.com/u/Shacbro)\
**Post date:** [July 4, 2016, 10:15pm UTC](https://forums.unrealengine.com/t/unable-to-declare-uphysicshandlecomponent/353336/5 "2016-07-04T22:15:50Z")

</div>

Thank you so much, this is exactly what I needed!

---

<div class="post-metadata">

**Author:** ![Nasty\_Time](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nasty\_Time](https://forums.unrealengine.com/u/Nasty_Time)\
**Post date:** [July 5, 2017, 2:14pm UTC](https://forums.unrealengine.com/t/unable-to-declare-uphysicshandlecomponent/353336/6 "2017-07-05T14:14:11Z")

</div>

Had the same issue with UE 4.16.2 & Visual Studio 2017 Community and this solved my problem. Thanks for help!

---

<div class="post-metadata">

**Author:** ![wcyee26](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wcyee26](https://forums.unrealengine.com/u/wcyee26)\
**Post date:** [October 4, 2017, 3:46am UTC](https://forums.unrealengine.com/t/unable-to-declare-uphysicshandlecomponent/353336/7 "2017-10-04T03:46:58Z")

</div>

In UE4.17, you can try:

```
#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "PhysicsEngine/PhysicsHandleComponent.h"

```

instead of #include “Engine.h”.

Because importing “Engine.h” will require long time to Build the project.
