Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing speed in splineController.cs
#1
hi there,

How would i go about changing the speed variable in splineController.cs?


I'm wanting to make it that it can be changed globally from any other script. In the past i've done something similar to this:


Code:
public static float speed = 5;

But with the splineController code, I'm not sure what i need to do.



Any suggestions?



Thanks
Reply
#2
First you need to include the namespace:

Code:
using FluffyUnderware.Curvy.Controllers;

Then you can reference the Splinecontroller you want to access, like:

Code:
public SplineController xy;

Then you can access its values. For speed it is:

Code:
xy.Speed = 5;
Reply
#3
Ah you're wonderful! Thanks so much for this great tool and prompt support. Can't wait to try it out later tonight!
Reply
#4
So I'm just trying the above out now, the namespace line and reference seem to link in but the xy. Speed shows an error...

NullReferenceException: object reference not set to an instance of an object HitCollision.Start()...

What could I be doing wrong?

Thanks again ?
Reply
#5
Please post your code.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  SplineController slows down approaching connections jh092 5 327 08-07-2020, 03:56 PM
Last Post: _Aka_
Question Changing speed between ControlPoints funkd 1 218 07-22-2020, 04:58 PM
Last Post: _Aka_
  make "GetCurrentControlPoint" in SplineController more accessable VampirasuGameStudio 2 890 04-19-2020, 02:03 PM
Last Post: _Aka_
  Changing Volume Mesh UV ATHellboy 15 3,282 03-19-2020, 05:35 AM
Last Post: ATHellboy

Forum Jump: