I'm working on a game engine that uses SFML. I'm currently working on adding scripting with AngelScript, however, I'm having trouble registering sf::Vector2 with AngelScript. I have the basic constructor set up, I can use sf::Vector in AngelScript, but I need to add operators, since Vector2 foo = Vector2(10.0f, 5.0f);
cannot be called from AngelScript without the = operator being defined for the type. Problem is: sf::Vector2 doesn't actually have an = operator defined... Is there workaround, or do I either have to create my own vector2 class or rebuild SFML with the required operators added?
sf::Vector2 is a template class, SFML contains a typedef for a Vector2 that uses floats called Vector2f https://www.sfml-dev.org/documentation/2.5.1/classsf_1_1Vector2.php