# My FConstraint Instance / UPhysicsConstrainComponent doesnt work in 4.14

**URL:** <https://forums.unrealengine.com/t/my-fconstraint-instance-uphysicsconstraincomponent-doesnt-work-in-4-14/377836>\
**Category:** World Creation\
**Tags:** Constraints, physics-constraint, UE4-14, unreal-engine, question, CPP\
**Created:** [November 29, 2016, 8:07pm UTC](https://forums.unrealengine.com/t/my-fconstraint-instance-uphysicsconstraincomponent-doesnt-work-in-4-14/377836 "2016-11-29T20:07:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MosesFlava](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MosesFlava](https://forums.unrealengine.com/u/MosesFlava)\
**Post date:** [November 29, 2016, 8:07pm UTC](https://forums.unrealengine.com/t/my-fconstraint-instance-uphysicsconstraincomponent-doesnt-work-in-4-14/377836/1 "2016-11-29T20:07:54Z")

</div>

So the following used to work in 4.12.

```
FConstraintInstance ConstraintInstance;

```

Now that I have upgraded the project to 4.14, when I create a FConstraint Instance I get the error message, “incomplete type is not allowed.”

Also my UPhysicsContraintComponent gives me a ton of “pointer to incomplete class type is not allowed” error messages.

I’m guessing they may have to be initialised differently now?

My Declaration

```
	UPROPERTY(EditAnywhere)
		UPhysicsConstraintComponent* PConstrain;

```

My Definition

```
	//Setting the constraint parameters of our Constraint Instance
	//Limiting the linear motion, Setting the limit size and setting the soft limit to true. Disabling Breakable option in order to ensure we get a rope kind of tug
	//ConstraintInstance.LinearXMotion = ELinearConstraintMotion::LCM_Limited;
	//ConstraintInstance.LinearYMotion = ELinearConstraintMotion::LCM_Limited;
	//ConstraintInstance.LinearZMotion = ELinearConstraintMotion::LCM_Limited;
	
	ConstraintInstance.LinearLimitSize = 10.0f;
	ConstraintInstance.bLinearLimitSoft = true;
	ConstraintInstance.bLinearBreakable = false;

	//Setting the linear soft limit, the stiffness and the damping
	ConstraintInstance.bLinearLimitSoft = 0;
	ConstraintInstance.LinearLimitStiffness = 0;
	ConstraintInstance.LinearLimitDamping = 10;
	ConstraintInstance.bAngularBreakable = false; 
	//ConstraintInstance.AngularSwing1Motion = EAngularConstraintMotion::ACM_Limited;
	//ConstraintInstance.AngularSwing2Motion = EAngularConstraintMotion::ACM_Limited;
	//ConstraintInstance.AngularTwistMotion = EAngularConstraintMotion::ACM_Locked;
	
	//Initialising a Physics Constraint Component
	PConstrain = CreateDefaultSubobject<UPhysicsConstraintComponent>(TEXT("Physics Constraint Component"));
	
	PConstrain->AttachToComponent(CrainSlider, FAttachmentTransformRules::KeepRelativeTransform, NAME_None);
	PConstrain->ConstraintInstance = ConstraintInstance;

	PConstrain->SetConstrainedComponents(CrainSlider, NAME_None, CrainWire, NAME_None);
```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_01fae35a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_01fae35a](https://forums.unrealengine.com/u/anonymous_user_01fae35a)\
**Post date:** [September 11, 2017, 6:25am UTC](https://forums.unrealengine.com/t/my-fconstraint-instance-uphysicsconstraincomponent-doesnt-work-in-4-14/377836/2 "2017-09-11T06:25:53Z")

</div>

Have the same problem. Have you found a solution?

---

<div class="post-metadata">

**Author:** ![MosesFlava](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MosesFlava](https://forums.unrealengine.com/u/MosesFlava)\
**Post date:** [October 24, 2018, 12:32pm UTC](https://forums.unrealengine.com/t/my-fconstraint-instance-uphysicsconstraincomponent-doesnt-work-in-4-14/377836/3 "2018-10-24T12:32:10Z")

</div>

In hindsight, as I’ve deleted this Repo anyway. But I would have assumed this was a IWYU problem.
