SceneComponent GetWorldLocation c++ equivalent

Hi,
I’m new to Unreal c++. I have experience with Blueprints before and wanting to convert to c++. I’m trying to get a line trace from the world location of the current scene component. How can I do that in c++? There is a blueprint node for that.
Thank you.

Perhaps something like *GetComponentLocation *or GetComponentTransform.

GetComponentLocation() - “Return location of the component, in world space”

https://docs.unrealengine.com/en-US/…ion/index.html

Also, kinda weird that there is “SetRelativeLocation()” but no “GetRelativeLocation()”.

You have to use “GetRelativeTransform().GetTranslation()” and “GetRelativeTransform().GetRotation().Rotator()”.

2 Likes