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?
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.
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:
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.
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.
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.
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.
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.
@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.
Still broken, and just wasted a bunch of time tracking down a bug that turned out to be because I was incapable of guessing that the pin inputs were inverted compared to their names and tooltips. (or the output transform is inverted, however you want to put it… )
Ironically someone from my studio already reported this issue… 3 years ago.
I know it might not seem like a hugely high priority fix, but it’d be really appreciated if you could look into it, it causes an outsized amount of frustration, and is a node that simply does not work the way it says on the tin…