Skip to content

* hot fix added for spline interpolator #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Config.json.enc
Binary file not shown.
12 changes: 11 additions & 1 deletion Scripts/Camera/CameraTarget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
*/

//#define SPLINE_INTERPOLATOR

using UnityEngine;
using IBM.Watson.DeveloperCloud.Logging;
Expand Down Expand Up @@ -51,8 +52,10 @@ public class CameraTarget : MonoBehaviour
private float m_RatioAtCameraPath = 0.0f;
[SerializeField]
private Vector3 m_DistanceFromCamera = Vector3.zero;
#if SPLINE_INTERPOLATOR
[SerializeField]
private SplineInterpolator m_SplineInterpolator;
#endif
private Transform[] m_PathTransforms;

[SerializeField]
Expand Down Expand Up @@ -174,6 +177,7 @@ public Vector3 TargetPosition
{
get
{
#if SPLINE_INTERPOLATOR
if (m_CameraPathRootObject != null)
{
if (m_PathTransforms == null)
Expand Down Expand Up @@ -208,7 +212,9 @@ public Vector3 TargetPosition
}

}
else if (m_UseCustomPosition)
else
#endif
if (m_UseCustomPosition)
{
return m_CustomPosition;
}
Expand Down Expand Up @@ -410,6 +416,8 @@ public void SetTargetPositionWithOffset(Vector3 offsetPosition)

#endregion

#if SPLINE_INTERPOLATOR

void OnDrawGizmos()
{
if (m_CameraPathRootObject != null)
Expand Down Expand Up @@ -445,6 +453,8 @@ void OnDrawGizmos()
}
}
}

#endif
}

}