Posts: 2
Threads: 1
Joined: Apr 2022
I know it sounds strange, but I want my curvy computer to stay in its initial position and rotation and ignore the rotation of it's parent.
This is so an enemy that is has a follower can have it's computer as a child.
I've successfully got it working at runtime, by setting the parent of the computer to null on Awake. But it still glitches out horrible in editor with the preview.
Using Curvy 8.
Brilliant asset. Just moved over from Dreamtek. It's good to be back with Curvy after a 5 year break.
Posts: 2,161
Threads: 96
Joined: Jun 2017
Hi
Sorry but I am not familiar with the terminology you used: curvy computer and follower. I am guessing that, in Curvy's terminology, the curvy computer is the curvy spline, and the follower is the spline controller. Am I right?
If so, moving the parent of a curvy spline will inevitably move the spline. This is because the spline and its control points (CPs for short) are simple game objects, which abide by the rules of transforms parenting set in Unity.
If you do need for the spline to be a child of the controller, maybe add a script that will, each frame, move the CPs local position in the opposite way of the movement of the controller, that way the CPs' world position stays the same regardless of the movement of their parent Spline's transform. This solution will make the spline refresh every frame, which will use CPU time, but this is the only solution I see that fits your constraint (the spline being the child of the controller)
Did this help?
Posts: 2
Threads: 1
Joined: Apr 2022
Sure does help. It is what I was thinking too. The inefficient CPU use will only be in the editor which is fine. At runtime, we'll simply de-parent the Curvy Spline. And thanks for clarifying the proper terminology. I'll test this out and then I think our company will be buying a dozen copies or so. Very worth it.
Posts: 2,161
Threads: 96
Joined: Jun 2017
(Sorry forgot to answer yesterday)
You are welcome. Feel free to ask any other question.
Have a nice day