//part 1
float Face(sf::Vector2<float> PosA, sf::Vector2<float> PosB)
{
return 45.; //to be finished
}
// part 2
if (Event.Type == sf::Event::MouseMoved)
{
sf::Vector2<float> PosMouse = sf::Vector2<float>(Event.MouseMove.X, Event.MouseMove.Y);
Sprite.SetRotation(Face(Sprite.GetPosition, PosMouse));
}
I want to set up the function Face() to operate on two vectors and return a float, but it's giving me this error:
Main.cpp|55|error: conversion from `<unknown type>' to non-scalar type `sf::Vector2<float>' requested|
Also, I'm not sure if this belongs in Graphics, Window, or System, because I don't know which one sf:Vector2 belongs to.
EDIT: I guess it really belongs in general because it's more of a general C++ problem than it is a problem with me using SFML.