x

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"

[Bug w/repro] Convert Transform to Relative incorrect.

Correct me if I'm wrong here.

Convert Transform to Relative should be a node that converts a world transform to a relative transform ( when provided a parent transform ) .

If that's the case I believe this node is currently errornous. I set up the nodes below so that the node pick up the transform of a 'picked' actor and set the transform as relative to the actor. I use a widget to display the transform.

initially it seems correct , but then the picked object is rotated , it is then wrong. Can someone check if this is an intended behavior?

alt text alt text

Product Version: UE 4.9
Tags:
rotation.jpg (136.5 kB)
rotation2.jpg (103.0 kB)
rotation.jpg (136.5 kB)
more ▼

asked Oct 20 '15 at 01:48 PM in Bug Reports

avatar image

Frozenfire
682 61 85 118

avatar image Hyperloop Sep 20 '17 at 05:20 PM

I am pretty disappointed that this is still not fixed....

avatar image Rumbleball Nov 07 '18 at 02:30 AM

I'm no transform genius, but this seems to do it.

alt text

avatar image Griffork_Opaque Nov 07 '18 at 02:38 AM

@Rumbleball this is a bug from 3 years ago referring to the fact that a node does not do the job it's supposed to do (because it's inputs are swapped). As far as I know this issue hasn't been fixed.

avatar image Rumbleball Nov 07 '18 at 03:42 AM

Yah and I just game across it in 4.19... it is just an workaround for people that stumble across this issue.

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

2 answers: sort voted first

Hello Frozenfire,

I was able to reproduce this issue on our end. I have written up a report ( UE-22445) and I have submitted it to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. Thank you for your information and time.

Make it a great day

more ▼

answered Oct 21 '15 at 03:49 PM

avatar image

Rudy Q ♦♦ STAFF
47.2k 545 132 525

avatar image RickSaada Nov 06 '15 at 06:28 PM

I ran into this as well, so I did some debugging. There appear to be two problems. KismetMathLibrary.h declares the node as: static FTransform ConvertTransformToRelative(const FTransform& Transform, const FTransform& ParentTransform);

and states it will give Transform relative to ParentTransform. The code however has the parameters the other way:

FTransform UKismetMathLibrary::ConvertTransformToRelative(const FTransform& WorldTransform, const FTransform& LocalTransform) { return LocalTransform.GetRelativeTransformReverse(WorldTransform); }

So it's returning the Parent relative to the Transform. Also, it's using the GetRelativeTransformReverse version. In TransformVectorized.h this is described as:

  * The below 2 functions are the ones to get delta transform and return FTransform format that can be concatenated
  * Inverse itself can't concatenate with VQS format(since VQS always transform from S->Q->T, where inverse happens from T(-1)->Q(-1)->S(-1))
  * So these 2 provides ways to fix this
  * GetRelativeTransform returns this*Other(-1) and parameter is Other(not Other(-1))
  * GetRelativeTransformReverse returns this(-1)*Other, and parameter is Other. 
  

I'm pretty sure for this node we really want GetRelativeTransform, not GetRelativeTransformReverse. When I fix the parameter swap and the Reverse problem then the node starts returning the right answers. Sadly, my app is still broken, because of the "constructor doesn't get map specific changes to component values and uses the default blueprint values instead" bug. Sigh.

avatar image Julien Guertault Apr 11 '16 at 08:44 AM

We did notice the same issue in our team with UE4.11.1.

The suggested fix is trivial and seems to work and solve the issue. Any news from that ticket?

avatar image Rudy Q ♦♦ STAFF Apr 11 '16 at 12:52 PM

Hello Julien Guertault,

I went ahead and double checked on this issue for you and it appears that its status has not yet been updated to fixed. However, I will be sure to bump up the community interest for this issue. Thank you for your time and information.

Make it a great day

avatar image xanatos123 Aug 03 '16 at 08:21 AM

there is same issue with 4.12.5. i think there is a little bug in function UKismetMathLibrary::ConvertTransformToRelative within KismetMathLibrary.cpp, just swapping ParentTransform and Transform will fix it.

avatar image Rudy Q ♦♦ STAFF Aug 03 '16 at 12:58 PM

Hello xanatos123,

Thank you for your information. I wanted to update the thread with a link to the public tracker. Please feel free to visit the provided thread for future updates on this issue.

Link: https://issues.unrealengine.com/issue/UE-22445

Make it a great day

avatar image muchcharles Jan 12 '18 at 12:42 PM

Any updates on this one? It has been a couple years now and this bites people often.

avatar image MrCorzell Aug 12 '16 at 12:54 AM

Strange that the variable names were modified but the bug remained. =|

avatar image Teiwaz Oct 06 '16 at 11:28 PM

I just spent a week rewriting and retracing a system only to find out that this was the root of my problem. UE-22445 has been open for nearly a year now. This seems to be taking an awfully long time for what should have been a 5-minute fix.

Makes me a little nervous to see what else I'm in for. Seems like a failure of process. Leaving landmines like this in the tools is worse than just cutting the broken functionality entirely.

avatar image Genova Oct 19 '16 at 04:39 AM

I'll bump that thread too, this kind of issue need more attention.

At least I was lucky enough to quickly realize something was fishy. But in a different scenario, I'm I could have lost a of time on it too.

avatar image garrettorious Oct 15 '18 at 06:51 PM

This should really be fixed. Had us all scratching our heads for two days and questioning our sanity until we found this thread.

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

oh wow. still not fixed?

I don't know man i've been using my own library ever since. sometimes things like that gets irritating because I've no idea when it's fixed.

I'm currently using my own Func library to do this. If anyone wants the code here it is , it's not 100% optimized, but if anybody wants here's it.

 FTransform UPCMathLibrary::ConvertLocalTransformToWorld(UPARAM(ref) const FTransform & LocalTransform, UPARAM(ref) const FTransform & ParentTransform)
 {
     FTransform OutTransform;
 
     FVector OutLoc = UKismetMathLibrary::GreaterGreater_VectorRotator(LocalTransform.GetLocation(),(ParentTransform.GetRotation().Rotator())) + ParentTransform.GetLocation();
     FRotator OutRot = FRotator(FQuat(ParentTransform.GetRotation()) * FQuat(LocalTransform.GetRotation()));
     FVector OutScale = LocalTransform.GetScale3D() * LocalTransform.GetScale3D();
 
     OutTransform.SetLocation(OutLoc);
     OutTransform.SetRotation(OutRot.Quaternion());
     OutTransform.SetScale3D(OutScale);
 
     return OutTransform;
 }




more ▼

answered Jul 11 '18 at 06:09 AM

avatar image

Frozenfire
682 61 85 118

avatar image Shivan Hunter Oct 06 '18 at 06:18 PM

Thanks for the answer! IT's crazy that UE4 lets bugs like this go so long.

Just a note - line 7 here is incorrect: it should be "FVector OutScale = ParentTransform.GetScale3D() * LocalTransform.GetScale3D();"

avatar image 6r0m Jul 02 '19 at 12:03 PM

how about push it to the UE source?

(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