I’ve been playing around with the engine for a while now, and I’ve been trying to find out how to find the relative position of a point (preferably, with a good accuracy, so angles would be the best way I guess), but I haven’t been very successful so far.
You get the object-to-world transform of your char with ACharacter::GetTransform().
Inverse-transform your point with it. If the resulting transformed position has a negative Y-Component, the point is left of your character.
If it is positive, it is right of your character.
FTransform trafoCharToWorld = GetTransform();
if ( trafoCharToWorld.InverseTranformPosition(vecTest).Y < 0 )
// left side of character
else if ( trafoCharToWorld.InverseTranformPosition(vecTest).Y > 0 )
// right side of character
@djchase- I’m so sorry, maybe I wasn’t clear, but I actually need the angle, well I could use the angle, because there will be points which aren’t at 180º/- 180º of the character, and those are the ones I need, I have to ignore all others… Sorry for not being clear the first time!