Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Camera Rotation Does Not Match Spline Node Rotation
#1
Question 
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]

Now this second image is from gameplay. You can see it's close... but not accurate.
[Image: 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!
Reply


Messages In This Thread
Camera Rotation Does Not Match Spline Node Rotation - by DCalabrese - 09-11-2013, 06:08 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_
  GO can't fit end of the spline GameDeveloperek4123 3 13 03-04-2024, 11:06 AM
Last Post: _Aka_
  Keeping a fixed spline length jh092 3 16 02-21-2024, 06:25 AM
Last Post: Primrose44
  How could I get position in spline from "From" value in BuildRasterizedPath? Chanon 1 8 02-12-2024, 09:54 PM
Last Post: _Aka_

Forum Jump: