Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I make the computer ignore it's parent transform?
#1
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.
Reply
#2
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?
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
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.
Reply
#4
(Sorry forgot to answer yesterday)
You are welcome. Feel free to ask any other question.
Have a nice day
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
  how to make fast moving controller go all the way to linear points?(curvy8) hawken 7 12 06-06-2023, 09:47 AM
Last Post: _Aka_
Brick Extending Curvy to make a Hallway editor. JacobSL 5 396 02-13-2023, 09:29 AM
Last Post: _Aka_
  Way to make gameobject follow splines 'human-ly'? yun844 3 11 01-17-2023, 10:18 AM
Last Post: _Aka_
  How to make mesh appear only on curves? Vancete 2 18 01-09-2023, 09:10 AM
Last Post: _Aka_

Forum Jump: