Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hints to Fixed Position #1

Open
duduRodrigues opened this issue Jun 22, 2017 · 3 comments
Open

Hints to Fixed Position #1

duduRodrigues opened this issue Jun 22, 2017 · 3 comments

Comments

@duduRodrigues
Copy link

Hey man, i am interested in make a kinematic project based on your code. But i've notice that your targets, with exception of the top-parent target, work all as position hints to the skeleton joints. I want to make the target position "fixed" for all joints, so when i drag the targe all the body is influenced by the target that i am dragging and the joint position is always the same as the target, is that possible?

@alansley
Copy link

alansley commented Jun 23, 2017

Yeah, that should be fine - if I understand you correctly, and assuming you're working in 2D, then you could have a 'main' chain which responds to the target, and then have 'sub-chains' connected to the main chain which you set up as you wish and just constrain the heck out of them - basically set them up with LOCAL_RELATIVE basebone constraints and lock everything in place by specifying clockwise and anticlockwise constraint angles of zero for each bone.

That way, the main chain responds to the target movement, but the connected subchains (while moving with the main chain) don't actually alter their configuration with respect to the local coordinate system of the main chain.

You could do the same thing in 3D by specifying local rotor joints with a constraint angle of zero.

If I haven't understood you correctly then maybe rephrase and/or give a quick 'mspaint' type diagram of what you mean and I'll do my best to help.

Cheers!

@duduRodrigues
Copy link
Author

duduRodrigues commented Jun 23, 2017

I'm going to try what you said and see how it works. I'm working with 3D.

Basically, what I am trying to do are these things:

  1. Lock the targets on the joint points
    -If I move any target, it will always be in the exactly same position of the joint, even if the joint movement was caused by a parent movement. I want the target to be attached to the joint.

  2. Make all chains work as parent chains
    -Imagine 3 joints 'A', 'B' and 'C'. A is parent of B that is parent of C.
    When I move the joint A, the joint B and C will be dragged by A.
    What I want to do is: When I move B, the Joint A and C should also be dragged, and same for C.

image

When I drag B, the parent joint A also moves.

@alansley
Copy link

alansley commented Jun 23, 2017

Ok, so what I said above definitely won't do what you want - but with the diagram I can see what you're trying to accomplish.

In the left part of your diagram where you're moving joint A, then the behaviour is like a single chain where C is the base and A is the target. On the right when you're moving B it's like you have two chains in a structure where A->B is one chain and C->B is another and B is the non-embedded target for the structure. If you were moving joint C is would revert to the behaviour of a single chain where A is the base and C is the target.

I think you could do it, but you'd have to write a method that reformulates the chain structure on the fly... unless there's something obvious I'm missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants