Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script inheriting SplineController doesn't work the same as adding component?
#1
I'm working on a "2.5D" game where you control a character that moves along a spline. I'm new to this level of development so I'm having trouble finding information in the documentation. I did find a suggestion to create a script that inherits SplineController but it's not working the way I expected. In the inspector, all the controls of the SplineController appear. However they don't seem to apply to the character and the character doesn't snap to the spline the way they did with the component.

Code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class scrPlayerSpline : FluffyUnderware.Curvy.Controllers.SplineController
{

   // Start is called before the first frame update
   void Start()
   {
       
   }

   // Update is called once per frame
   void Update()
   {
       
   }
}

What am I missing? I've selected a spline for the controller in the inspector.
Reply


Messages In This Thread
Script inheriting SplineController doesn't work the same as adding component? - by clearleaf - 04-27-2019, 10:28 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Play() does not cause SplineController to produce expected behaviour ConCat 8 1,332 02-08-2026, 11:54 AM
Last Post: _Aka_
  SplineController Ignores Follow-Up and Chooses Wrong Spline Josenildo 7 4,446 07-29-2025, 09:15 PM
Last Post: _Aka_
  API - How to get an existing component? RickPalo 2 1,848 11-22-2024, 03:54 PM
Last Post: RickPalo
  How to modify Input GameObject's transformation properties by script. j95677 2 1,754 07-05-2024, 06:28 PM
Last Post: j95677

Forum Jump: