0
$\begingroup$

Object A is facing a curtain direction.
Object C is A's child's child's... child.
So A is the root parent of C.

When i rotate A, C follows A to rotate. What i want is constrain C's orientation while rotating A.
For instance, keep the angle between C's local Z axis & world's Z axis less than 20 degrees, how can i achieve that?

I tried to limit C's Z location, but it doesn't constrain A's rotation, and their relative position doesn't keep constant any more.

$\endgroup$

1 Answer 1

0
$\begingroup$

I'm using bones, but with empties or objects it's the same.

In my example socket bone is child of B, which is child of A. C doesn't have any parent.

In rest pose, all bones are pointing up (Z axis).

C has a copy loc, copy rot, copy scale targeting Socket (World space).

Then it has a limit rotation +- 20 degrees on both X and Z axis (Local space).

If the animation has some jumps between certain values, change the order from Default to XZY or ZXY, making sure that the central axis (Z or X) never gets close to 90 degrees, to avoid Gimbal lock.

enter image description here

$\endgroup$
1
  • $\begingroup$ Your method works with C's rotation limited, but how can i limit A's rotation at the same time? I can't just set A's rotation limit, because A's rest pose is arbitrary(not point up). $\endgroup$ Commented Oct 11, 2024 at 13:31

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.