Can't read editor value in c++

Hi guys:

i have a question about read the value changed in editor from c++ code.
i declared two variables in my c++ class,one FTransform and one FRotator.

91336-no1.png

then i changed both of them in editor.

91337-no2.png

then i tried to read them in c++ code.

as you can see,MyRotation was read correctly,but MyTransform wasn’t

91339-no4.png

what did i do wrong?how can i read the FTransform value correctly?sorry for my English and hope you guys understand what i mean.thx in advance.

I’ve never used FTransforms before – maybe there is something quirky about FTransforms that I don’t know about that interferes with Blueprints. What are you using the FTransform for? Typically FTransforms are used for low-level 3D transformations from one space to another. I see that you are using it in a Pawn. Are you trying to get the Pawn’s location? If so, you should use a FVector.

Thats wierd. In console during play mode type in “displayall Car MyTransform” this will display realtime value state on screen and see what happens to it

i need store a pawn’s location and rotation,so i use a FTransform to store them both.maybe i should try use a Vector and a Rotator,i think this will work.

still “Rotation=(X=0Y=0Z=0W=1)Translation=(X=0Y=0Z=0)…”

Ok maybe tell where do you setting this (from where that property screen is)? You setting this varable in constructor maybe?

errrrrrrrrrrrr,
i upgrade my unreal engine to the newest version and it’s all ok now,maybe it’s a bug and fixed already.
anyway thanks for the reply :slight_smile: