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.
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
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.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
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)
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
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
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
  Rotation issue on a Parented Spline Controller Karthik7Nike 6 149 12-07-2018, 09:35 AM
Last Post: _Aka_
  Custom connection controller help dazz777 6 255 11-21-2018, 11:26 AM
Last Post: _Aka_
  Generated meshes not 'parallel' to spline Alexey 8 300 11-20-2018, 07:13 PM
Last Post: Alexey
  Freewalk mode, then return to spline mythstified 6 784 11-09-2018, 08:20 AM
Last Post: sanaeerumey

Forum Jump: