When I declare the libraries in the following order, I encounter the error “no suitable user-defined conversion from ‘Vector2’ to ‘Vector2’ exists”:
#include <raymath.h>
#include <Character.h>
However, when I reorder them, the error disappears:
#include <Character.h>
#include <raymath.h>
The error occurred in the line of code:
if (Vector2Length(direction) != 0.0) {
worldPos = Vector2Add(worldPos, vectorScale);
}
Should the libraries that we create be declared first?