Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to make camera look at the center of path?

I am making an endless runner game and the player movement happens wrt where the character is looking. Now for straight paths this works ok but not so for the curved paths as i cant get the character to look at it. So what I ask is how do I make the character look at the center(or in a way, the axis) of the path he's running on.

Best Answers

    Accepted Answer

    Try putting and empty objects with colliders along the path with 2 3 unit difference and then place a trigger on player make it slightly bigger than player and then in the script check for if something enters the trigger and then just say player.lookat(empty object which entered the trigger) and do this only once. Thats how you can make you player and camera to look constantly at center of path

    Accepted Answer

    Just notify me if it work or not


  • Thanks! That sounds like a really great starting point. I literally had no idea how i was going to implement it. This really opened up a lot of ideas for me. Thanks again!

  • Sure thing

Sign In or Register to comment.