FULL DISCLOSURE: I also posted this on the Unity forums prior to my account being activated. That post is here: http://forum.unity3d.com/threads/170355-RELEASED-Curvy-Fast-Spline-Interpolation/page7
I'm using and loving Curvy, however I have an issue where moving a camera along the spline does not have accurate results.
What I am trying to do: I have a game where the camera is on rails. Player sits in chairs, stands up, walks around, etc.
After trying a number of systems, Curvy seemed like the best option. So I lay out my splines, put the camera on it, and hit play. Problem is, the camera moves along the spline - but the rotations are inaccurate.
To line things up properly, I put the Curvy spline node as a child of the camera, set its position and rotation to 0 / 0, then move and rotate the camera. When done, I move the Curvy spline back into the Spline object. This is working MOSTLY well - except for that final lineup.
Check out the following two images... the first image shows how the camera should be lined up. I confirm this by making the camera a child of the Curvy spline node, and zeroing out its position and transform.
![[Image: curvy_proper.png]](https://dl.dropboxusercontent.com/u/6678808/curvy_proper.png)
Now this second image is from gameplay. You can see it's close... but not accurate.
![[Image: curvy_offset.png]](https://dl.dropboxusercontent.com/u/6678808/curvy_offset.png)
I should add the following bulletpoints:
- The camera has no parent object (it's parent is the Scene itself)
- I am using PlayMaker to do the movement (with the CurvyMoveAlongSpline action)
- Set Orientation on the PlayMaker Action is set to True.
- Approximate Position on the PlayMaker Action is set to False.
- On the Spline itself, orientation is Tangent, Initial Up-Vector is ControlPoint, and Granularity is 360.
I've played around with a bunch of options but what you see in the second image is the closest I have come. What do I have to do to make the in-game transform properly match the actual node transform?
Thanks in advance!
I'm using and loving Curvy, however I have an issue where moving a camera along the spline does not have accurate results.
What I am trying to do: I have a game where the camera is on rails. Player sits in chairs, stands up, walks around, etc.
After trying a number of systems, Curvy seemed like the best option. So I lay out my splines, put the camera on it, and hit play. Problem is, the camera moves along the spline - but the rotations are inaccurate.
To line things up properly, I put the Curvy spline node as a child of the camera, set its position and rotation to 0 / 0, then move and rotate the camera. When done, I move the Curvy spline back into the Spline object. This is working MOSTLY well - except for that final lineup.
Check out the following two images... the first image shows how the camera should be lined up. I confirm this by making the camera a child of the Curvy spline node, and zeroing out its position and transform.
![[Image: curvy_proper.png]](https://dl.dropboxusercontent.com/u/6678808/curvy_proper.png)
Now this second image is from gameplay. You can see it's close... but not accurate.
![[Image: curvy_offset.png]](https://dl.dropboxusercontent.com/u/6678808/curvy_offset.png)
I should add the following bulletpoints:
- The camera has no parent object (it's parent is the Scene itself)
- I am using PlayMaker to do the movement (with the CurvyMoveAlongSpline action)
- Set Orientation on the PlayMaker Action is set to True.
- Approximate Position on the PlayMaker Action is set to False.
- On the Spline itself, orientation is Tangent, Initial Up-Vector is ControlPoint, and Granularity is 360.
I've played around with a bunch of options but what you see in the second image is the closest I have come. What do I have to do to make the in-game transform properly match the actual node transform?
Thanks in advance!