[Closed] Wiring a Camera's Roll_Angle
How could I do this??
I can’t discover what the controller for Roll_Angle is…
I’ve tried $.transform.roll_angle but nothing…
I need to wire one camera’s Roll_Angle to another…
Does anyone know how to do this via script?
Thanks!
Roll_angle is a property of the Look_At CONTROLLER assigned to the transform property of target cameras.
$.transform.controller.roll_angle
You can wire via the UI and it shouldn’t be a problem to wire via MAXScript:
paramWire.connect2Way $Camera02.transform.controller[#roll_angle] $Camera01.transform.controller[#roll_angle] "roll_Angle" "roll_Angle"
Ummmm it looks like Camera translations are quaternian transforms:
rotate $camera_name (angleaxis 34 [0,0,1])
Not certain how to do it in absolute terms. But that should get you started.
Ah!
I see…
Thanks, Bobo!!
Wonderful
Okay, now something else I wasn’t able to do even out of MaxScript…
I wanted the camera’s target to always face the camera…
But I get – Unknown property: “controller” in (quat 0 0 0 1)
I’ve tried many other ways, but it doesn’t allow me saying it will create a dependancy loop…
Is there any way possible?
Basically I need the target to rotate on it’s Y axis depending on the camera’s position (facing the camera) and on it’s X axis depending on the camera’s roll_angle… Therefore permiting objects linked to the target to rotate according to the camera…
It’s hard to explain >.<“
Oh… I proposed the camera’s target always facing the camera (lookat_constraint) because as the camera moves, the target will rotate in several directions, also when I roll the camera the target will need to follow this roll…
It is possible, but you are approaching it incorrectly. Obviously, the camera is already looking at the target, so you cannot have the target looking back at the camera.
Here is what to do:
*Create the object you want to align to the view, say a Plane
*Align to the Target, Pivot to Pivot.
*Link to the Target.
*Go to the Hierarchy tab, under Link Info uncheck all Inherit Rotate and Scale options, leaving only Position X, Y, Z checked.
*Go to the Motion tab, assign a Look At Constraint to the Rotation track of the Plane
*Pick the Camera as the look at node.
*Set the Look At Axis to Z
*Uncheck the World Up Node and select the Camera as the Up Node.
*Set source Axis Y aligned to UpNode Axis Y (this is the up of the camera which has X to the right and -Z along the viewing direction)
If you move or rotate the camera or the target, the plane will still remain aligned to the view plane, looking with its Z axis at the camera.
I have three letters for you, Bobo: WOW
!!!
Really, you’re a genius! Lol… Thanks a lot…
Now I’m gonna try put that into MaxScript
(If you know how, don’t post please… I want to try to make it… If I need help in anything I’ll ask if that’s okay with you lol)
Thanks a lot
I managed to do it
I only couldn’t uncheck via script the “Inherit” properties… But it works perfectly anyways…
Thanks, Bobo! :]