- Home /
Camera position on path Proportional to Player'sposition
HI!
I'm a newbie here. Please forgive my bad english, i'm a french student^^.
Well, i have a problem with my camera in unity. I have a camera on an itweenPath (a catmull rom spline). I want to move it when the player is moving (the best exemple is God of war camera).
But it can't work if i d'ont put my character on a waypoint path. This is my first (of many ^^) question.
How can i assign a waypoint path to my Player but don't force it to follow the path?
My second question:
When i'll have my two path i want to calculate avery frame where my camera is (in percent) on the itweenPath when the player is at 50% of the waypointPath.
To do this, i've read that i have to use polynomial interpolation, to interpolate values constantly from waypoints to spline points. For exemple
Player position% = Camera position %
0 10
20 10
40 20
60 40
et ainsi de suite.
I've read on a gamedev.net tread that i have to use Lagrange method.
But i don't know how to script it.
Anyone can help me to do this? I've read many post and website on waypoint and Lagrange interpolation. But it didn't helped me :/
I know that it is possible but it will kill me^^.
Thanks for reading this :). Have Good Day!
Your answer
Follow this Question
Related Questions
Camera to smoothly LookAt() a series of empty objects along a curved path that act as a 'rail' 3 Answers
How to use iTween to achieve a camera move with multi - path? 1 Answer
Switching Between (many) different iTween Paths (C#) 0 Answers
Camera switching with iTween Touch 1 Answer
Export camera path (first person controller) in x,y coordinates 2 Answers