I get the following error: error C2102: ‘&’ requires l-value when compiling the following line:
if (&(obj->getTranslation()).y ==5)
I am trying to get the y-axis coordinate of an object, but I seem to be missing something. Could you please help me out.
Pretty sure you just want this:
If get Translation returns a pointer then you’ll want to dereference it, so you may have been looking for:
But you could just use the dereference operator you’re using on obj: