Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Camera Rotation Does Not Match Spline Node Rotation
#3
(09-11-2013, 07:54 AM)Jake Wrote: Ok,

I've had a look into your example scene.

First: A Granularity of 360 is insanely high, you won't need that usually. In your example I lowered it to 20 and can't see a difference. Keep in mind that Granularity means cache size (and cache calculation!). No big deal on a desktop, but for mobiles this could become an issue.

Am I right that you want the camera to end up upright (camera.transform.up==(0,1,0) ?

If this is the case, you'll need to ensure that the orientation of the spline (yellow line gizmos) is upright. What I did:

- set Spline.Orientation to "ControlPoint". By doing so you have full control over the spline's orientation by rotating the control points
- removed rotation from CP004

(Image attached)

As a result the camera ends up perfectly aligned.

Does this solve your issue?

That does indeed look MUCH better, thank you!

Is there a good way that you know of to, in the editor, to easily build out a camera path that will look 1:1 in gameplay as it does in the editor? Because even this is slightly offset from how it looks in the editor (especially now that the final node has a rotation of 0/0/0).
Reply


Messages In This Thread

Possibly Related Threads…
Thread Author Replies Views Last Post
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 6 03-28-2024, 10:08 PM
Last Post: _Aka_
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 14 03-04-2024, 11:06 AM
Last Post: _Aka_

Forum Jump: