Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rotation issue on a Parented Spline Controller
#1
Hi,

Is there an option to control the spline locally and not globally?
The goal is to place [ParentObject] anywhere in the world and rotate it anyhow and have the controller work locally. The positioning works but the rotation does not work.

Here's how I've structured the objects:

ParentObject
     -> CurvySpline
                   -> CP0001 etc.

     -> SplineController
                   -> Object to Move Along the Spline

If I rotate [ParentObject], the CurvySplineController does not rotate with it.

On the forums, I see people talking about an option (Space.Self / Space.World). But I don't see it anywhere on the Spline Controller or the Spline. Sad

Using Curvy Version 4.1.1.
Thanks
Reply
#2
Hi,
I attached a scene that reproduces what I understood from your setup, and when rotating the ParentObject, everything works as expected. Can you please open that scene and tell me if yes or no you encounter the issue in it?
Here screenshots from my test:
The scene with unrotated ParentObject
   
The same after rotating ParentObject
   
Here is the hierarchy
   


Attached Files
.zip   ControllerRotation.zip (Size: 4.02 KB / Downloads: 4)
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
And about the Space.Self / Space.World option, it is no more part of Curvy because it wasn't working as expected
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#4
Photo 
Thanks for the quick response!
I did check the scene that you sent. It seems to work.

I've attached a scene that contains the structure that I'm going for. Let me know what I'm doing wrong.

I'm attempting to move an object on a vertically aligned 'C' shaped spline. However, I don't want the spline to direct the orientation of the object; I want complete control over the rotation of the object.
So I've set the Spline Orientation to None. But that seems to lock the rotation of the Object.

Let me know.
Thanks a lot!

"I want complete control over the rotation of the object"
Clarification: I'd like to control it by rotating the parent object (i.e the Spline itself and thereby the object on it).

Rotation on the Y-axis, to be specific!


Attached Files
.zip   ControllerRotation.zip (Size: 4.12 KB / Downloads: 3)
Reply
#5
Ok, I now understand what you try to do. To do it, you will simply need to add a script that overrides the controlled object's rotation to set it the same as the rotation of the spline. It's a one line script. I added it to the zip and updated the scene.


Attached Files
.zip   ControllerRotation2.zip (Size: 4.84 KB / Downloads: 4)
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#6
That works!!  Big Grin
Thank you so much!
Reply
#7
You are welcome
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
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_
  GO can't fit end of the spline GameDeveloperek4123 3 13 03-04-2024, 11:06 AM
Last Post: _Aka_
  Keeping a fixed spline length jh092 3 16 02-21-2024, 06:25 AM
Last Post: Primrose44
  How could I get position in spline from "From" value in BuildRasterizedPath? Chanon 1 8 02-12-2024, 09:54 PM
Last Post: _Aka_

Forum Jump: