Question: I made a character, and how he was supposed to act, but now that I'm writing, he's turning out completely different than I wanted. Should I try to get him on topic again, or let him go on the way he's going and try it from that angle?
This happens a lot. Characters take on a life of their own. Your writer's mind has a natural tendency to follow the most interesting idea at any given time. And these ideas may not be the ones you started with.
The question is whether you need this character to perform a specific dramatic function. If he is evolving in a way that is different from your original idea but still would allow him to fulfill that function, no problem.
If he is evolving into a character who could not fulfill the function you envisioned, you have basically three choices. You can force him back on track, you can create a new character to fulfill the function this one cannot, or you can change your story.
The key to all of this is where your passion lies. Consider your original idea for this story and what made you excited about it. Is this still the story that demands to be told, the one you feel a burning passion for? If so, then you owe it to yourself to find a way to tell it, even if that means reining in the odd character.
On the other hand, if your story is evolving into something you feel much more passion about, then I suggest you go back to your outline and perhaps revise it to become the story that wants to be told.
You may have to go a little way down both paths before it becomes clear which one you have the greatest passion for. In other words, maybe you have to let the character do what he wants for a while, then step back and ask yourself if this story has you more or less excited than before. If you are losing the passion, then go back to the point where the story goes off the rails and take the other path.