# Breaking PCG vector parameter (or attribute)

**URL:** <https://forums.unrealengine.com/t/breaking-pcg-vector-parameter-or-attribute/1210826>\
**Category:** Blueprint\
**Tags:** unreal-engine, Blueprint\
**Created:** [June 26, 2023, 7:21am UTC](https://forums.unrealengine.com/t/breaking-pcg-vector-parameter-or-attribute/1210826 "2023-06-26T07:21:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AFedeleallalinea11](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/afedeleallalinea11/32/721929_2.png) [@AFedeleallalinea11](https://forums.unrealengine.com/u/AFedeleallalinea11)\
**Post date:** [June 26, 2023, 7:21am UTC](https://forums.unrealengine.com/t/breaking-pcg-vector-parameter-or-attribute/1210826/1 "2023-06-26T07:21:59Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/a/3/da3769fd80c9a2b1e5a6210a7c35018dfef86b2b.png)

Hi there! In PCG, I need to random rotate the mesh of 90, 180 or 270, so I’ve prepared a float array with those values. My problem is that the rotation is a vector and I want only to rotate on the z axis.  
I’ve prepared this construction script:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/d/c/0dce5424d5568e820ad5bef29088a5e68ddbb0bd.png)

But the node “Get actor property” won’t accept it, it seems to accept just floats.  
How can i break the vector for just feed Z axis? Any suggestion?

Thank you!

#PCG

---

<div class="post-metadata">

**Author:** ![PresumptivePanda](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/presumptivepanda/32/1194593_2.png) [@PresumptivePanda](https://forums.unrealengine.com/u/PresumptivePanda)\
**Post date:** [June 29, 2023, 10:36pm UTC](https://forums.unrealengine.com/t/breaking-pcg-vector-parameter-or-attribute/1210826/2 "2023-06-29T22:36:37Z")

</div>

Hi there @AFedeleallalinea11,

Hope you’re well!

This topic has been moved from **International** to **Programming & Scripting: Blueprint**.

When posting, please review the categories to ensure your topic is posted in the most relevant space.

Thanks and happy developing! 🙂

---

<div class="post-metadata">

**Author:** ![AFedeleallalinea11](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/afedeleallalinea11/32/721929_2.png) [@AFedeleallalinea11](https://forums.unrealengine.com/u/AFedeleallalinea11)\
**Post date:** [July 1, 2023, 12:33am UTC](https://forums.unrealengine.com/t/breaking-pcg-vector-parameter-or-attribute/1210826/3 "2023-07-01T00:33:17Z")

</div>

Hi! Thank you for the advice, actually I’m always not sure where to post my requests, now I know it! Thanks again

---

<div class="post-metadata">

**Author:** ![MaHua\_Mad](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MaHua\_Mad](https://forums.unrealengine.com/u/MaHua_Mad)\
**Post date:** [January 30, 2024, 4:03pm UTC](https://forums.unrealengine.com/t/breaking-pcg-vector-parameter-or-attribute/1210826/4 "2024-01-30T16:03:30Z")

</div>

Hi! I’ve happened to bump into the same question you have, have you solved this yet?

---

<div class="post-metadata">

**Author:** ![imanm2001](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@imanm2001](https://forums.unrealengine.com/u/imanm2001)\
**Post date:** [November 15, 2024, 2:01am UTC](https://forums.unrealengine.com/t/breaking-pcg-vector-parameter-or-attribute/1210826/5 "2024-11-15T02:01:54Z")

</div>

In PCG Graph, create a vector attribute (e.g. [1,0,0] to get X value) and dot product the two vectors.

---

<div class="post-metadata">

**Author:** ![Ntox\_Judas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ntox\_Judas](https://forums.unrealengine.com/u/Ntox_Judas)\
**Post date:** [August 12, 2025, 12:38am UTC](https://forums.unrealengine.com/t/breaking-pcg-vector-parameter-or-attribute/1210826/6 "2025-08-12T00:38:30Z")

</div>

Hello! The answer is to use the copy attribute node. For example, if you want the Z Rotation to be (0, 0, 90), but it is currently (15, 65, 20) you can create a rotator attribute (or take one from an existing node) with the values (0, 0, 90) and drop a copy attribute node with an input source of $Rotation and an output target of @Source. This will set the rotation of your target to (0, 0, 90).

Alternatively, you can mix and match rotations this way. For example, say you want something to always point towards the ground as to respect gravity. You can do all the initial rotation randomizations as normal, then drop a Transform Points node and check on Absolut Rotation. This will make the asset(s) have a rotation of (0, 0, 0) or whatever you set the absolute rotation to. Once this is done, you can use a Copy Attributes node, the source being the node before your absolute rotation and the target being the transform points node and set the Input Source to $Rotation.Yaw and the output target to @Source. And boom! Things will always point towards the ground but also respect the Z rotation of the assets so they don’t behave like billboards.
