PDA

View Full Version : Independent rotation although parent constrained?


jeany
12-01-2009, 12:38 AM
Hi!

I've got a box parent constrained to a sphere and I was wondering if it is somehow possible that I can still rotate the box so that it keeps this rotation when moving the sphere?

Thanks for your help! Jeany :)

jeany
12-01-2009, 12:41 AM
At the moment when I rotate the box it always flips back to its original position as soon as I move the sphere.

shinyprem
12-01-2009, 07:54 AM
Hi...
Have ur box grouped then apply constraint to the sphere.. This way you can retain the rotation
Rgds,

jeany
12-01-2009, 08:14 AM
Hi shinyprem,

thanks for your response. In that case I would always need the group pivot to follow the box pivot. Otherwise the group pivot will stay in its root position when I move the box to the sphere and then I can't parent constrain it correctly.

But making the group pivot follow the box pivot would cause a cycle dependency because the box is a child of the group. Do you understand what I mean?

Thanks. Jeany

jeany
12-01-2009, 08:19 AM
I have to do this very often which is why I can't move the group to the sphere because then I would always have to go into the outliner. I want to be able to just grab the object in the scene and then move it around.

Or is there a way to say in MEL: "If box was clicked in scene --> switch to group and deselect box"? That would solve everything.

mlefevre
12-01-2009, 09:53 AM
Well you could setup a scriptJob for that, but I don't think it would be necessary. In either case, the group is the constrained object and it's channels shouldn't really be animated.

shinyprems setup should work fine.

Parent constrain the group to the box (maintain offset off)
Delete the parent constraint.
Parent the box to the group
Constrain the group to the sphere (maintain offset off)
Now the box will follow the sphere, and its channels are free for keying.

jeany
12-01-2009, 11:23 AM
Hi Matt,

I've followed these steps:

1. Parent constrain the group to the box (maintain offset off)
2. Delete the parent constraint.
3. Parent the box to the group

With step 3 you mean that the group should be a child of the box or vice versa?

Why did you want me to do a parent constrain and then delete it straight after that?

Maybe I just don't get it.

Thanks. Jeany

mlefevre
12-01-2009, 12:15 PM
Hi Jeany,

I usually do a parent constraint (with maintain offset checked off) and then delete it, when I want the objects to share the same space. (i.e. so there is no offset between the two objects)

There's a variety of ways to do this, that is just one way.

I've attached a file. Perhaps I'm not fully understanding what it is you're after.

jeany
12-01-2009, 12:52 PM
Hey,

thats so nice of you to create this scene for me. What I would want is that the offset_group pivot also follows the cube translation which seems to be impossible because it always causes a cycle (as the cube shall also follow the group translation).

I have decided to use the scriptjob. It also does what I want. Do you think I might get perfomance issues with ~ 100 script jobs running or do they not need many resources?

Thanks again for your help. Jeany

DarkFerret
12-03-2009, 12:33 AM
Hi,
iv got a similar problem so i thought id piggy back on this thread.

Im making somthing similar to a desk fan, so i have the blade rotating inside a cage, now if i want to move the fan and the cage as one object somewhere else in the scene i assumed id have to parent the objects, but when i do this the fan will no long rotate when i hit play.

Of course iv found a cheat to this by just grouping all the objects to move it somewhere else but when it comes to say parenting the fan then to a desk so the whole unit moves with the desk it would start getting a little awkward.

Thanks.

jeany
12-04-2009, 08:22 PM
The solution that solved my problems: http://forums.cgsociety.org/showpost.php?p=6231904&postcount=8

Thanks again to everyone who contributed their suggestions. I really appreciate that!

Jeany

CGTalk Moderation
12-04-2009, 08:22 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.