How to get location value from component transform?

Hi all,

I’m fairly new to C++ but have quite a lot of experience with blueprint. In C++ i’m trying to specifically get the Z value from a component’s transform. Essentially I want to break the transform, and get a single value from the transform’s location.

I’m able to get a specific value from a vector, such as:

ZVariable = LocationVector.Z;

But I’m clearly missing something when I attempt to extract the value from a transform. What am I missing here?

You can call

.GetLocation()

on your transform.

And then get the .Z from that, right?