Hi, I’ve been trying to achieve a smooth camera and player follow movement for my runner game but tbh I’m having a lot of problems when it comes to the rotation. I’ve tried to rotate the camera and player 90 degrees when the player enters a trigger but it’s not practical and I don’t always get the same results because I have to position it exactly in a sweet spot between two floor platforms. I also tried a spline asset of the unity asset store but it’s kind of buggy. An example of what I want to achieve is the camera and follow movement of the game Cube Surfer!
. Does someone know what is the best way to get a camera and player follow movement like in that game?
Have you checked out cinemachine? If not, it is far and away the easiest system to get a good camera behavior. This is a good tutorial to start with. It has a lot of components so it can be a little overwhelming at first but it is well worth learning. The track and dolly portion may give you a jumping off point.
I’ve already tried it but I found it kind of hard to position the camera and path in the position that I wanted :(. Is there any chance that you know another solution?
Well, I would revisit it if I were you, I think all the pieces are there. That notwithstanding, if I understand the behavior you want correctly it should be as simple as setting the camera as a child of the player. It will follow and rotate with the player like any other gameobject. I am assuming you are rotating your player already as it moves through the course.