Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Moving spline controller with parent game object
#1
I've got a question about moving spline controllers attached to splines, which are in turn moved by a parent transform. The basic scene hierarchy is as follows:

-splineController

-parentGameObject
 |-splineA
 |-splineB
 |-splineC

Note, the splineController is not a descendant of the parentGameObject. The controller starts off on splineB, and splineB is connected to splineA and splineC at either end. If I move the parentGameObject, all the splines and the spline controller move as expected. So far, so good.

Now, if the connections at each end of splineB are deleted, making splineB isolated from the other two splines, yet still a child of parentGameObject, things stop working as expected. The controller now does not move when the parentGameObject's transform is moved, however, it does seem to move if the parentGameObject transform rotation is changed, but not position.

My ultimate application is essentially multiple floors with a set of elevators. Each floor has a series of splines as does each elevator platform. When an elevator arrives at a particular level, it is connected to the spline at that level. A controller can now be driven from the level onto the elevator platform. When a platform is moved it is disconnected from the static spline at the starting floor, and stays with the elevator platform(parent game object), until it arrives at some other floor, at which time it is reconnected to another spline and the controller can depart.

I'm currently using Curvy v2.1.3, however, there was no difference when upgrading to the latest version.
Reply
#2
Hi,
What is the value of Space in your controller? If it is Self, please test with World and let me know of the result.
Anyways, the issue you raised seems very similar to issues I fixed for the upcoming Curvy update I am working on. If changing Self value does not avoid the issue, write me and I will send you a not-fully-tested-but-usable beta version of the upcoming Curvy update. I am expecting to finalize the upcoming update and push it to the unity store in a couple of weeks.
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply
#3
Both Self and World behave the same, neither cause the controller to move with the spline's parent game object. I appreciate the offer, however, I can wait for an official release; no need for a beta. Let me know if you can repeat the problem. If not, it should be pretty simple for me to construct a basic scene to reproduce the issue.
Reply
#4
I would appreciate if you send me the reproduction scene. I will make sure it is fixed in the next release.
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply
#5
I think I narrowed it down to the spline controller's speed. If the controller is at zero speed it doesn't move with the spline's parent. Attached is a simple example project with two platforms, splines, and controllers. The one with the moving controller(black ball) works as expected; the stopped controller doesn't.


Attached Files
.zip   curvytest.zip (Size: 1.26 MB / Downloads: 1)
Reply
#6
Thanks for the reproduction scene.
This is fixed in the update I am preparing. The actual fix is based on code that is drastically different than the code in the current Curvy version (2.2.4.2), so I can't simply extract the fix and send it to you. So the best solution is to wait for the update.
If you need a solution right now either:
- give your controller some very small but not 0 zero.
- or remove all occurrences of "&& (Speed != 0 || mForceUpdate)" in Assets\Packages\Curvy\Base\CurvyController.cs (might create undesired side effects)
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply
#7
Glad to hear. How many weeks do you expect for the official release? It's likely I can wait.
Reply
#8
I am expecting 2 weeks
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Filling a closed spline dynamically rickgplus 1 231 04-16-2025, 08:56 AM
Last Post: _Aka_
  Morph game object along curve. mikechr2000 5 702 02-04-2025, 09:30 PM
Last Post: _Aka_
  Disable a spline's gizmo when not selected or disabled. mikechr2000 1 286 02-03-2025, 09:34 AM
Last Post: _Aka_
Information Questions regarding spline colliders and collisions with rigidbodies Spyboticer 7 1,102 01-20-2025, 12:25 PM
Last Post: _Aka_

Forum Jump: