0 votes

I've worked very hard on a 2d Skeleton which required an hierarchy.

But it seems I can't transform a character part without affecting its child?

So, does this mean I have to strip down the hierarchy to adjust the parent node without affecting child node?

in Engine by (101 points)

3 Answers

+2 votes
Best answer

Make a hierarchy like this:

Main container
   Independent rotation
   Another piece

Now, if you want to rotate just the Independent rotation node, you can freely rotate it without affecting the rest of the skeleton. And if you want to rotate it along with Another piece by the same amount, rotate the Main container instead, and both its subnodes will follow.

by (64 points)
selected by
+1 vote

Children receive the parent transformations by design. If you don't desire that, you'll want to keep the nodes adjacent, while using a root node that only acts as a general container.

by (5,266 points)

Is it possible to make a skeleton in that way?

You won't be able to use bones or IK chains, since they point from pivot to pivot without parenting.

But isn't this like a question of how to make something hard and soft at the same time?

I don't really see that's similar... I admit I'm a beginner, but how is adjusting parent node not possible in a skeleton. Imagine if I want my skeleton to rotate its head, how can I rotate it without rotating his whole body?

In that layout the parent would be some core body piece. The arms, legs, and head would be children of the body. So you wouldn't parent your arms to your head.

For an example I would recommend this video: https://www.youtube.com/watch?v=Mz4wrV0FsDo&t=8s

Thank you by the way... (I know it's 3 years later xd)

0 votes

Another way to design this, if it's something you want as a baseline (that a child does not follow the parent), just structure the relationship like this
Parent:Spatial > Containerchild:Node > desiredgrandChild:spatial
what happens is that because standard Nodes don't have transform data, they don't pass on the transform information of the parent to the grandchild, meaning that you now have a way to create independent rotation of a parent from a grandchild

However, this also means that if for any reason you do need to rotate a grand_child with the parent, it will have to be done through code somehow... (maybe by using re-parenting?)

I learned of this because if you have a viewport as part of a scene, then the camera childed to the viewport will not move along with the scene root, because viewports do not have transform data.

by (24 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.