The deciding factor of which character route you go on is the dialogue options. In order to get yourself on a character's route, they have to like you more than the other characters. Some dialogue choices will increase a certain character's affection towards you, but most dialogue choices have no effect. While it is possible to get a true ending on your first playthrough, it gets extremely easier on your second playthrough since you unlock an option that highlights the proper choices. If this option is selected, there will be a little picture of the girls' head next the the dialogue choices that increase her affection. When going for Rin's route, only pick the options that have her head next to them. If her head isn't there, just pick one that doesn't have anyone's head next to it.
You'll know which route you're on after the battle with Zenya at the Battle Arena. But that doesn't mean you can just pick whichever dialogue options you want after this point, as it is possible to fail the true ending. Continue to pick the friendly dialogue options for Rin. I'm not sure if any dialogue options will actually decrease her affection since they aren't marked, but it's better to be safe than sorry. Avoid picking any of the rude or overly sexual options, unless one of those happens to be marked with Rin's head.