Unable to compare values

Hi,

I am trying to check the player position against the Monster position so I read the player position in using a pointer to the player (Player* playerPos)
Then I attempt to compare the position of the current Monster (this->getWorldLocation())

Which will return the current position and I do the same for the player however I am getting the error

1 IntelliSense: no operator "==" matches these operands
operand types are: Vector2D == Vector2D

1
2
3
4
5
6
7
8
9
10
 bool Monster::checkCollisionWithPlayer(Player* playerPos){
	
	if (this->getWorldLocation() == playerPos->getWorldLocation())
	{
		return true;
	}
        else
            return false;

}


Can anyone advise what I am missing?

Kind Regards
What is a Player?

You're probably going to need to show more content. For example show how Player is defined and declared. Then show how you're calling this function.


Topic archived. No new replies allowed.