Hi . I put an arrow on my gunmesh and stored its Ftransform in a variable . now i want to get its vector location to use as the spawn location.
FTransform AWeapon::GetSpawnPoint()
{
return ProjectileSpawnPoint->GetRelativeTransform();
}
If what I did is wrong, what is the right way to get the location of arrow component?
Zaucy
(Zaucy)
2
FTransform contains Scale, Rotation, and Translation. If you just want to get the Translation you can use GetTranslation. Here’s the doc for it: https://docs.unrealengine.com/latest/INT/API/Runtime/Core/Math/FTransform/GetTranslation/2/index.html
I’d highly recommend checking out the FTransform documentation to see the other functions available for you.
I need to know how to get arrow location for using as spawn location.
I tried GetTranslation as you said but it did not work