- Home /
Question by
klaermans32 · Dec 12, 2020 at 10:40 PM ·
2dspritebug-perhapsspline
SetTangentMode of Spline not working through code
spline.InsertPointAt(index + i, location);
spline.SetTangentMode(index + i, ShapeTangentMode.Continuous);
I have this piece of code, that adds a point to a spline and then sets the tangentmode of that point. When i verify the tangent mode of the point during gameplay, it says that its mode is continuous. Everything right so far. BUT the "continuous" effect is not applied, so basically it does nothing. Then, after manually changing the mode in the editor from continuous to a different mode, and BACK to continuous: it works. So my question: Is this a bug? am i doing it wrong?
questiona.png
(25.7 kB)
Comment
Best Answer
Answer by klaermans32 · Dec 22, 2020 at 11:26 AM
It turns out you also have to set the left tangent and right tangent before it will work.