Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extrusion does not match Controller position
#1
Hi

I am having a bit of trouble.

My aim is to generate a spline that I willl use as the "map" like you would see in a lot of mobile games. It has nodes along it that are the levels, and as you complete nodes, the line extrudes out to the next node so you can see where you are up to.

In order to get this to work, what I am trying is:
Place the controllers along the spline using relative position. (this works fine)

At runtime, I get the reletive position of the controller, and then I set the extrude "to" value at that same value.

However there seems to be a bit of inaccuracy. It gets close however when the value is < 0.5 then the extrusion seems to overshoot or go past the controller. If the value of the "to" is > 0.5 then the extrusion seems to not reach the controller.

Is there some odd calculation that goes on? is it somehow calculating the extrusion reletive to the control points the current extrusion Is between while the controllers are relative to the distance of the entire curve?
Reply
#2
Hi,
There is indeed a difference. Controllers use the TF, and extrusion uses relative distance (distance / spline's length).
A solution, besides doing the conversion yourself, is to use a Path Controller instead of a Spline Controller, because it uses relative distances.
Did this help?
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
(05-26-2020, 11:30 AM)_Aka_ Wrote: Hi,
There is indeed a difference. Controllers use the TF, and extrusion uses relative distance (distance / spline's length).
A solution, besides doing the conversion yourself, is to use a Path Controller instead of a Spline Controller, because it uses relative distances.
Did this help?

That seems to have done the trick!

Thanks so much for the quick response. Still learning just how this thing works Smile
Reply
#4
You are welcome. This difference between Path Controller an Spline Controller is based on a choice done before my time at Curvy. I kinda get why this choice was done (once you look deep in the code it kinda makes sense), but I still want to get rid of that difference. Right now I am focusing on more important fixes, but maybe some time soon.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Getting object on spline Position when Spline has coordinates larger than 2000 velikizlivuk 5 8 09-05-2023, 01:01 PM
Last Post: velikizlivuk
  How to detect bend in a spline or strait part of spline at position velikizlivuk 10 25 08-14-2023, 12:08 PM
Last Post: _Aka_
  Fading in/out extrusion mesh of a spline? _RicO 3 5 07-25-2023, 09:40 PM
Last Post: _Aka_
  Controller behavior like E21_VolumeControllerInput ashuraVlad 3 8 06-22-2023, 09:26 AM
Last Post: _Aka_

Forum Jump: