# SetPhysicsAsset() does't work like the blueprint node

**URL:** <https://forums.unrealengine.com/t/setphysicsasset-doest-work-like-the-blueprint-node/450683>\
**Category:** World Creation\
**Tags:** skeletal, unreal-engine, FeatureRequest, Physics, question, Blueprint, CPP\
**Created:** [June 14, 2019, 1:47pm UTC](https://forums.unrealengine.com/t/setphysicsasset-doest-work-like-the-blueprint-node/450683 "2019-06-14T13:47:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Klian](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/klian/32/1207571_2.png) [@Klian](https://forums.unrealengine.com/u/Klian)\
**Post date:** [June 14, 2019, 1:47pm UTC](https://forums.unrealengine.com/t/setphysicsasset-doest-work-like-the-blueprint-node/450683/1 "2019-06-14T13:47:56Z")

</div>

Hello guys, I was trying convert a project function from BP to C++. This function need to change the physics asset of a skeletal mesh. If i do that with the blueprint node everything work fine but if i try to do the same thing in C++ it does’t affect the skeletal mesh. Can anyone help me? Maybe I’m missing some steps

```
if (bUseAltPhAt && AltPhAt) 
{
	Mesh->SetPhysicsAsset(AltPhAt);
}

```

> **[Set Physics Asset](https://docs.unrealengine.com/4.27/en-US/BlueprintAPI/Components/SkinnedMesh/SetPhysicsAsset/)**
>
> Set Physics Asset

---

<div class="post-metadata">

**Author:** ![Klian](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/klian/32/1207571_2.png) [@Klian](https://forums.unrealengine.com/u/Klian)\
**Post date:** [June 14, 2019, 4:59pm UTC](https://forums.unrealengine.com/t/setphysicsasset-doest-work-like-the-blueprint-node/450683/2 "2019-06-14T16:59:32Z")

</div>

I forgot to declare UPROPERTY()

```
//Before .h
UPhysicsAsset* AltPhAt;

//After .h
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "MyActor|Settings")
UPhysicsAsset* AltPhAt;
```
