Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SplineController Move Speed
I am using a Spline Controller and I am trying to make my object move at certain speed relative to the world size along a CSCircle spline. I am showing at runtime A Generated Mesh using the Curvy generator to show the path.

I am having a few issues
1) What are the "units" of speed, I don't really understand what this value represents?
2) The "world" speed seems to get faster the bigger my spline controller scale gets, I am guessing I need to change the radius to update the speed instead of the object scale?
3) Updating the radius at runtime makes it so I can no longer see the the path, however updating it in the editor I see the changes fine.
1.) SplineController either uses TF or Unity world units, but...
2.) don't scale your controller and check wether your controller sets local or world coordinates
3.) You're updating the radius of the CSCircle shape by code or animation? If you use the Radius property the script should update itself (if not you've encountered a bug!). If you animate the value, be sure to call Refresh()
What does the spline controller units mean, is it World Units per second?

Looks like the issue was 3 fold, Scaling the mesh was scaling the movement speed, I wasn't calling Refresh and the Shape Extrusion I was using wasn't thick enough to see.

However now I see a new issue. When I set the radius to something very small like .1224
The shape is no longer a circle put a pentagon.

This is with Path.Resolution = 200. Optimization turned off
are there other ways to make this circle more of a circle and this small resolution. (The object moves in a perfect circle..)
Controller units are world units when you use an absolute movement mode!

To work with very small resolutions, you should check a few settings:

- CurvyGenerator.MinDistance. This will most likely solve your issue.
- CacheDensity of the shape spline

Does that help?

Possibly Related Threads…
Thread Author Replies Views Last Post
  Can you move generated objects along spline? FernDigestive 1 8 04-02-2023, 12:14 PM
Last Post: _Aka_
  Feature Request-move UI elements in SceneView spawnstorm 5 20 09-17-2022, 12:37 PM
Last Post: _Aka_
Wink In SplineController OnPositionReachedList Event is missing shimizu 2 13 02-07-2022, 12:47 PM
Last Post: shimizu
  best way to rotate, change offset, and inset position of splinecontroller object smackledorf 1 25 01-17-2022, 01:39 PM
Last Post: _Aka_

Forum Jump: