Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Transform a FVector property to Local or World Space

Hi guys.

I have a question regarding some FVectors properties that have the meta = (MakeEditWidget = true) in their properties tag, Basically I'm moving this vector to point into certain position where I want to move the player after he does certain interactions in the level, so I'm looking for a way to transform these vectors to World space or local space so the values actually make sense when working with these values, since the current vector values are tied to it's parent so it's not the real local space or world space. So is there anyway to transform these into World or Local space?

Here are a pair of screenshots:

https://gyazo.com/1065efd4bd66aafe451e6b8fd13cbeae https://gyazo.com/97150a83a3cf0d834d22b4116db4f90e

Thank you.

Product Version: UE 4.20
more ▼

asked Oct 10 '18 at 10:46 AM in C++ Programming

avatar image

23 14 17 22

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

You can use Compose transform in the kismet library.

Just make a transform for your vector with scale 1 and compose it to your actor world transform. Get the location from the result and you should have your world position.

more ▼

answered Oct 10 '18 at 10:56 AM

avatar image

1.4k 1 14 17

avatar image WolfAlvein Oct 10 '18 at 11:06 AM

Thank you, I will test this and let you now

avatar image WolfAlvein Oct 11 '18 at 08:08 AM

Hi HarryHighDef.

So this is what I did to transform the information before it's given to the actor, is this what you meant?

 FTransform PortalTransform = GetTransform();
                     FTransform StartLocalToWorld = FTransform(FRotator::ZeroRotator, StartPoint, FVector::OneVector);
                     FTransform MiddleLocalToWorld = FTransform(FRotator::ZeroRotator, MiddlePoint, FVector::OneVector);
                     FTransform EndLocalToWorld = FTransform(FRotator::ZeroRotator, EndPoint, FVector::OneVector);
                     StartLocalToWorld = UKismetMathLibrary::ComposeTransforms(PortalTransform, StartLocalToWorld);
                     MiddleLocalToWorld = UKismetMathLibrary::ComposeTransforms(PortalTransform, MiddleLocalToWorld);
                     EndLocalToWorld = UKismetMathLibrary::ComposeTransforms(PortalTransform, EndLocalToWorld);

And in the receiber I got the Location for each of does transformed values. Thank you for the help.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question