Binary ‘==’: no operator found? FTransform == FTransform

Yea these are float point coords. Maybe unreal has limited the use of == with floats and it’s thowing the intended error, even if it works you are going to get a wrong output.

doing this in blueprint gives me the correct exact output location to spawn an actor.

well yea because it’s using a library with a function from it for conversion.
You should round up the numbers and turn them to integer, but you have to catch the float array with [ float index to int ]

Your vector array[ int index] = Transform (x,y,x)

Besides the float you will get a copy with an int for it.

I am trying to implement this library for C++ but member

Severity Code Description Project File Line Suppression State
Error C2248 ‘FTransform::Translation’: cannot access protected member declared in class ‘FTransform’ MyGame C:\MyGame\Source\MyGame\C_Utils\MyUtils.cpp 12

Yea that function has a lock on it then, you can see in unreal doc pages what functions are locked and cannot be used in cpp, you can use only in blue prints.
So they did this to limit access to flawed output maybe and left it for blue prints with a conversion library. Could be that, anyway you can’t access restricted functions and classes from C++ in unreal if they are locked.

Your only solution is to convert to an int.

lets try, how to convert it to an int? my brain is just melting, already second day trying to fix this

I never did this with Ftransform, only with Fvectors.
You have to catch the index with the operator [ ]
declare an int first or the array is type int for indexing.
When you add the possition or possitions to the vector, in your case the FTransform you have to catch the index [ ]

ok, and can I use blueprint library for this particular function? or it will also not work in C++?

You can also do this
int a4;
int a4 = floatpoints Add(FVector x,yz blah blah blah

So it adds the vertices and at the same time creates an int for it.
This is a conversion method.
In this case floatpoints is your array of floats.

I don’t know if it works with ftransform. Works for vectors. But ftransform is made out of vector data. If it works reply, currious if it works like this.

So convert and obtain a integer and use that to compare the indexes of the ints. You have to create int indexes for all your values.

Ok I will now try this solution.
and to explain more what I am doing , this image will explain all.

Currently I am at the Random Display Location a problem :smiley: point and very closer to finish it…
everything else working just perfectly.

You don’t have to copy the a4 as an example, you can name your int how ever you want or your array of floats.

I transform data from local to world not to get distortions out of place when I’m using relative possitions I covert back and forth, so if it works please post a replly I may want to use this too.

I will post it for sure, even if not works I will post.
lets see what we will get , hope everything will work fine :slight_smile:

You can also try to capture it inside the vertice array.
Your float Vertices[int index] = FVector

But you have to have a function to calculate the grid line if this is what you have and return values with a function.

return x + y , you declare them inside the function as params.
The values then are loaded into an int type of array, then used with [capture] to load it into the other array.

int index = Your_return_function(x, y);

Captures

The [] does not only introduce the lambda but also holds a list of captured variables. It’s called “capture clause”.

So it captures int values to store them with floating points, it creates int indexes. You may pull data after that from the array and compare it with ==

1 Like

I am unable to produce a working code in C++, can you make a working example of this logic with same name prefix? so I can exactly try if it will try.

I don’t write code for people, this is just for helping out with the stuff you have.
I have to get into it and it’s time consuming. You should try that, there are plenty of ways to convert or add int to vectors

I don’t say to get into it, I just don’t know which variable to convert in which.
I tried your solution and it gives me infinite loop, it mean I don’t convert it properly .
this is why I asked to show me at least a small example of this logic, the rest I will go my own

Transform (name of variable ) is the array, it acts as a variable.

So ```
Location_



Is ? what. a simple float variable, an Ftransform, where did you get this value from.

So this value, 

Location


What type is it ? is it a fvector, a simple float variable a transform type ?
1 Like

Location is FTransform a returning value of random location function