Get the world coordinates for actor

This must be a stupid question but I really cannot get the correct coordinates…I keep getting (0,0,0) with whatever I use.

Basically, I have a C++ Actor , which I added as component a StaticMesh, and made it root.

I created a variable ‘StartPosition’ which I made visibleAnywhere, and I defined it in constructor with:


StartPosition = myMeshPlane->GetComponentLocation(); // doesn't work

GetActorLocation doesn’t work either…

How can I retrieve correct coordinates?

Thank you!