View Full Version : aim constrain question

11-30-2005, 07:17 PM
hello all,

i am starting to get into making custom controls for my rig and i have the following questions.

how can i aim constrain a plane to the camera, even if the camera is switched from front, to side, to perspective, etc. in other words, no matter what viewport you are in the plane will always be facing you. i am familiar with writing basic expressions and am learning a bit about MEL lately, so i assume one of these might do the trick.

also, this might be trickier . . .
now that the plane is always facing the currently selected camera, how can i make it so the plane can be moved left and right, but always stays within the view (possibly using the resolution gate) without sliding off to the top, bottom, right, or left. i basically want to give the user a way to move the control box for the rig to any part of the viewport, without accidentally sliding it out of the point of view. this one i got no clue on.

any help is appreciated. to me, i am thinking the first answer might be kind of a simple expreession or melscript. the second one seems complicated, but maybe i am wrong.

p.s. in the end the plane will more likely be a nurbs rectangle of course.

12-02-2005, 10:37 PM
well you have a couple issues with having a plane do that unless you setup a specific work enviroment for the user.

1. when it switches views youre actually going to a different camera, so to do that youd have to use a scriptjob that would check what was the current view and then parent constrain the control based on the new view.
2. you could have one specific control camera that the user has to use for that control and in that case you could just parent the controls to the camera. and if you did that then the user could just have hotkeys for predefined views so that the controls would stay with the camera but the view would change.
3. you could setup a gui for changing camera views so that it makes the controls switch when they change views.

personally i hate controls like that cause theyre only really useful for like facial animation and you can just have a seperate camera for that anyways.


CGTalk Moderation
12-02-2005, 10:37 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.