Move camera based on object scale?


#1

Hi all,

So, I have a small issue I’m not too sure how to resolve…

Lets say I have a car contained in a Dummy cube and a camera in scene. The camera is looking directly at the front of the car and the car fills the safe area of the camera. Now the car scales up (I.E. it becomes 2x larger area) (Doing this by scaling the Dummy object) resulting in the car being outside the cameras safe area…

Is there a way to move the camera back automatically (locked to the Y axis) based on the scaling of the cars Dummy? Bear in mind that the car/Dummy will also turn and rotate showing the side, then rear and sometime top or obscure angles. I do not want the camera to rotate with the car/Dummy. Just to always ensure it fills the safe area.

Animating is not an option as I need to use this as a master scene file that will be used for multiple sized objects (not just a car)

I have not really used constraints much (A little roller shutter animation and a camera along spline) so I’m hoping this can be done and someone has the knowhow to give me a little guidance.

Thanks all


#2

Two ways: wiring parameters and reaction manager. Look these up in the help documentation, they are pretty simple.


#3

Whats the point of this?
If you would do it wright, you wouldn’t see any changes in scale…

What do you mean by that?


#4

Thanks @jessifer this has done this trick, I had to create an additional dummy object to attach to the VRay cam to get around an error but it is working.

@domos
For example, if you made a cube 100 wide by 200 deep and the cube from the front filled the frame, when you rotate it 90 degrees it would not fit in frame without moving the camera. the same goes for if you scale the object up. I wanted a fixed camera position with 1000’s of other objects in the BG so needed a way to easily move the camera away from the primary object based on that objects scale. The no animating means that I did not want to bake anything into the timeline. I just wanted the ability for the camera to move so that the target object would always fit in the safe area.