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
  I want to make the beginning and end of a mesh translucent. yanke 3 4 05-21-2022, 11:53 AM
Last Post: _Aka_
  how to make the lines disappear little by little ? Zik Dipa 1 5 01-11-2022, 09:26 PM
Last Post: _Aka_
Information How to tell volume spot to ignore mesh bound? MarioBag 3 219 11-17-2021, 12:04 PM
Last Post: _Aka_
Brick Extending Curvy to make a Hallway editor. JacobSL 3 380 10-13-2021, 05:09 PM
Last Post: _Aka_

Forum Jump: